-
Notifications
You must be signed in to change notification settings - Fork 12k
cli 1.5.0 - slower build, larger bundle size and weird zone behaviour #8457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
For development, a different source map type is used that is integrated with the JS bundle. This increases the size but allows for faster rebuild times. This is not used in production builds. For production builds, the time has increased because the build optimizer is now enabled by default which in the case above has decreased the overall size by at least 200KB. The build optimizer can be disabled by using the As to the third issue, can you open a separate issue with more detail on the problem as well as a minimal reproduction, if possible? |
I have also increased production packages with 1.4.9
1.5.0
|
I have the same issue but I don't know its source. |
Same, my main budle increased from 246kB to 3.6MB after updating to angular 5! Production build is also taking >20 minutes where it previously took 2. |
@clydin I have revisited issue with NgZone. If the application is served with 1.4.9 version everything works fine but if I use 1.5.0 version this error is shown in the console:
And a few seconds later this one:
Additionally, it looks like fonts and images happen to load with some kind of delay. The homepage is shown and only after 4+ seconds keywords will be replaced with material icons. Network screen: |
There was a similar report by @teabagp in angular/angular#20414 that shows this behaviour. It can be reproduced by closing the https://github.com/teabagp/testapp repro. Using Angular CLI 1.5 with Angular 5 yields these bundles:
Using Angular CLI 1.4.9 with Angular 4.4.6 yields these bundles:
So I also observed double the memory usage (1080MB on 1.5 versus 580MB on 1.4), so this problem might be related to #5618 right now. |
@filipesilva Yes, that's exactly what I'm seeing - the main bundle specifically has gone from 246kB to 3.6MB in my project, I was also experiencing issue #5618, but that could be unrelated. |
I am facing the same issue. |
Based on @clydin's great work in angular#8456. I had to adapt it to use the StandardTransform model we use currently but the logic is his. Should addressed the bigger AOT non-prod builds and memory consumptions in prod build. Fix angular#8457 Partially adresses angular#5618 Supersedes angular#8456
Based on @clydin's great work in angular#8456. I had to adapt it to use the StandardTransform model we use currently but the logic is his. Should addressed the bigger AOT non-prod builds and memory consumptions in prod build. Fix angular#8457 Partially adresses angular#5618 Supersedes angular#8456
My main bundle has gone down from the 3.6MB to just under 2MB so a great improvement with the 1.5.2 patch. Still 4x larger than the previous 246KB it was with the <1.5 CLI, is this expected? The vendor bundle has gone, but the overall size is larger. |
Is that for a production or development target? |
Full build command output:
Compared to old output (with a few lines less code mind):
|
Hmm, I took the old branch and upgraded the CLI only to 1.5.2 (not updating angular to angular 5) and it comes up with a similar result to the 1.4:
|
I did the math pretty quickly but the new total build is about 100KB larger. With the new main bundle (which includes vendor) being about 7KB smaller. Overall that's about a 2% increase in total size. So not ideal but not horrible either. The main bundle is also slightly smaller which is in the critical path so that at least means a slightly shorter bootstrap time. The changes in lazy loaded chunk size especially the common chunk are definitely areas that could be looked at. Angular 4 cannot use the new Angular 5 AOT compiler which is why the results look similar to 1.4. |
Great, the v5 build has a few extra lines of code that probably account for the difference. When I looked at the lack of a vendor bundle I did think that the new main might just have it incorporated. Thanks! |
Based on @clydin's great work in angular#8456. I had to adapt it to use the StandardTransform model we use currently but the logic is his. Should addressed the bigger AOT non-prod builds and memory consumptions in prod build. Fix angular#8457 Partially adresses angular#5618 Supersedes angular#8456
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Versions.
I am having few issues with new version of Angular CLI. First is bundle size, for example, if a project is served with "angular-cli" version 1.4.9 I have this output:
ng serve --env=local
ng serve -prod
But if a project is served using "angular-cli" version 1.5.0:
ng serve --env=local
ng serve --prod
Please notice that vendor bundle is three to four time larger. Why do we have this large discrepancy in the size of a bundle?
Additionally, there is an issue with speed and request duration. For example, request that gets a document by ID, if a project is served using older version duration of this request is about 40 - 50ms. With the new build, when I click the button to fetch document nothing is happening for few seconds and in total request duration is more than 10 seconds or request gets stuck for some unknown reason. Nothing is shown in console. Am I missing some configuration or is it something else?
The text was updated successfully, but these errors were encountered: