4 ms·
Angular team member here :) >our bundle size hasn't moved or increased slightly Please make sure you are using the latest version of our compiler and runtime.
by mgechev 6y ago
Angular team member here :)
>our bundle size hasn't moved or increased slightly
Please make sure you are using the latest version of our compiler and runtime. Many developers observed significant improvements after the v9 release. Here's just one [example](https://news.ycombinator.com/item?id=22260864 https://news.ycombinator.com/item?id=22260864).
>Every ngconf there's talk of the magical 2kb hello-world
Currently, it's absolutely doable to get very small bundle size (<7-8KB) for a hello-world application. This, however, relies on private APIs. We haven't made them public yet, because not many folks are building hello world apps, but in the future we'll be exploring how to reduce the footprints of the framework even further for smaller apps.
>We're currently at 2mb main/vendor after spending A LOT of time optimising and making everything lazy
It is shocking for me that you're spending that much effort on optimizing your app, but you can't get your bundle below 2MB. I'm spending large chunk of my time looking into apps and thinking how to make them smaller & faster. I'll be more than happy to connect and brainstorm the same for your case. Please reach out to me on my hackernews username @google.com
>Every year I install the VSC Language Service plugin and have to disable it the same day due to it continuously crashing and killing the editor so it seems we'll never get to benefit from that.
Sorry to hear you had such an experience with the language service. If it keeps crashing, definitely report the problem here https://github.com/angular/angular/issues https://github.com/angular/angular/issues. We'll be very thankful if you share reproduction steps.
>Then I see a continuous stream of core developers leaving the Angular project due to toxic behaviour from Igor and it feels hopeless and depressing.
Folks leave and and others join. I can't comment on my co-workers experiences, but after 2 years working on Angular I haven't experienced any of the behavior you're referring to.
>The one saving grace is that the entire ecosystem is written in TypeScript and it's nice seeing everything typed to perfection.
Oh, I wish everything was that perfectly typed :). This is something the team and the community is constantly working on, but we still have a long way to go until we reach perfection.
- hitekker 6y agoFor reference, a former maintainer wrote about toxicity in the Angular dev team. https://medium.com/@jeffbcross/jeffs-letter-to-the-angular-team-and-community-5367934a16c9 https://medium.com/@jeffbcross/jeffs-letter-to-the-angular-t...
- mgechev 6y agoYes, I've worked with Jeff and I'm familiar with the post. In fact, Jeff was the one who first invited me to apply for a role at Google after our collaboration on the Angular mobile toolkit and it was great working with him :) It's not easy to share such a personal story publicly. I'm sorry he had such experience and I'm not saying he does not have the right to be upset. He knows the best what he went through and how he feels. I'm just saying that it's not correct to generalize and gave myself as an example for someone who can't relate to his experience.
- zepto 6y agoVery positive response! It sounds like you don’t think there is any truth to what he is saying. That seems interesting given that he is not the only one saying it.
- mgechev 6y agoThere's no way for me to know what happened without being part of the team back then. What I'm certain is that he had a bad experience which impacted him negatively and I'm sorry he had to go through this. The only thing I'm saying is that it is not correct to generalize, giving myself as an example for someone who haven't experienced anything similar.
- lmohseni 6y agoYikes. Blink twice if you need someone to send help.
- vosper 6y ago> It sounds like you don’t think there is any truth to what he is saying I've no idea how you reached that conclusion given that the comment you're replying to says >> I'm sorry he had such experience and I'm not saying he does not have the right to be upset. He knows the best what he went through and how he feels.
- KronisLV 6y agoThis seems like a good example of productive discussion! While this won't necessarily solve the original poster's problems in of itself, it does give actionable steps on how to address them! As for anyone interested in real world comparisons of many of the popular frameworks (though not necessarily the most bleeding edge versions), feel free to have a look here: https://github.com/gothinkster/realworld https://github.com/gothinkster/realworld The last time someone did a writeup on the results was in the March of 2020, but even then Angular wasn't necessarily that big in the bundle sizes that it generated: https://medium.com/dailyjs/a-realworld-comparison-of-front-end-frameworks-2020-4e50655fe4c1 https://medium.com/dailyjs/a-realworld-comparison-of-front-e... Though the situation can indeed worsen as you introduce more and more libraries into the mix and as the project grows.
- mushishi 6y agoFWIW, I recently left a project with quite a lot of Angular (2+) code (not massive project but good chunk of code for three developers), and mostly it was a real pleasure as most of the stuff was strictly typed. One extra reason that smoothed the experience was that our Spring Java/Kotlin endpoints have corresponding client typescript API (and data structures) generated automatically by custom tool http://github.com/evidentSolutions/apina http://github.com/evidentSolutions/apina i.e. Having defined endpoint controller with methods, you have automatically Angular service that has the same methods with the similar types. (One may need to define some custom datatype de/serialization but not much) If I had to say two things that I would like to get improved: 1) better typing related to Reactive Forms and Angular Material (e.g. IIRC Material dynamic table definitions were declared in a way that it lost IDE navigation and static analysis) 2) Faster compiling times, but we got this to be good enough for hot-reloading which matters most. RxJS Observables with Push ChangeDetection was heavily used. Personally just thanks for your contribution to make web developing more enjoyable!
- intellix 6y agoIt seems that Material + CDK accounts for about 625kb of our bundle. Screenshot of source-map-explorer output: https://imgur.com/a/pGNlMZU https://imgur.com/a/pGNlMZU Our site is entirely data-driven via CMS and each of the Material components are available for use from there, which is why they're all in use. We're using the latest of everything (v10 atm) as we're using Renovate so it's all correct etc
- sod 6y agoIf you care about javascript bundle size you have to avoid everything that comes from google (besides angular core & common of course). Material, animations, cdk, ... everything is just horrendously over engineered and nothing optimized for size. E.g. just look a sourcecode for material checkbox! https://github.com/angular/components/blob/master/src/material/checkbox/checkbox.ts https://github.com/angular/components/blob/master/src/materi... Don't get me wrong, I like those bundles - and I like my frameworks over engineered. They take care of edge cases. And if I'd write a CMS I'd be all over those packages. But if your constraint is bundle size, you have to avoid them.
- aabbcc1241 6y agoAgree. My last experience with angular (and ionic in particular) is it's hard to archive both good DX and UX. There are tools that produce smaller bundle size (e.g. stencil and react) but angular has much better DX. Svelte maybe better but not used it in production yet.
- mchusma 6y agoI will just chime in to say that we love Angular on our team. We love the opinionated, batteries-included philosophy of angular, and it does keep getting better over time. We don't want to have to make the decisions that are required for React applications. For teams of 3+, I think Angular is the better choice most of the time. It is easy for us to make well maintained, fast applications across platforms. I think you've made reasonable choices over time. Thanks for your work.
- merb 6y agoour main bundle is at 2mb as well. unless you have a cdn lazy loading is a pain. react is so much smaller.
- hajhatten 6y ago>Every year I install the VSC Language Service plugin and have to disable it the same day due to it continuously crashing and killing the editor so it seems we'll never get to benefit from that. I've heard my partner swear at least a couple of times a week over this since we've started working from home due to corona.
- altcognito 6y ago> Currently, it's absolutely doable to get very small bundle size (<7-8KB) for a hello-world application. This, however, relies on private APIs. We haven't made them public yet, because not many folks are building hello world apps, but in the future we'll be exploring how to reduce the footprints of the framework even further for smaller apps. This answer doesn't quite cut it. Every project starts out as an "hello world" type application. How do you audit the cost of each additional package if you didn't even start out with a "small bundle size" from the beginning? I believe you guys have made great strides and I appreciate your efforts immensely. I wish you the best of luck, I hope you're able to actually address the large size of deployment in a meaningful fashion.