-
Notifications
You must be signed in to change notification settings - Fork 12k
Rebuild should be shorter because the lazy chunks have not changed #15086
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
Tried the repro, and could see ~40s rebuild time on my machine. Noticed that TS processing took very long, some processing that I wasn't expecting to happen with chunks did, and that there was some sort of hashing computation done for the lazy modules too. Something else that I found interesting: rebuilding at still takes ~14s after removing @SanderElias also mentioned that he saw high CPU usage on this repo in between builds. He thought it was due to the file watchers. |
Having the same issue with similar dependencies. |
Been looking into this and there are two parts to the problem:
Together these two things make the rebuild for a The first problem was actually reported in #14775 and already addressed in #14778. I tested your repro with The second part I'm still trying to identify. |
Opened an issue in Webpack: webpack/webpack#9460. I could reproduce that having many chunks slows down webpack compilations (without any CLI stuff) even when the lazy chunks don't change. |
Updating to webpack 4.38 (#15170) should fix it, as the Webpack folks just added some very impressive (2x to 5x) rebuild perf improvements for this case. |
Any real world metrics about the effect of the fix? |
@sokra I compared dev rebuilds using
So no apparent improvement with 0 lazy chunks, and increasingly bigger improvement as more lazy chunks are present. |
Closing as the fix has been merged and released. |
@filipesilva I didn't see this issue on release notes. Which version been applied? |
@doggy8088 the PR that updated our version of webpack was #15170, released first in https://github.com/angular/angular-cli/releases/tag/v8.2.0-rc.0. You should get it by updating to |
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
Command (mark with an
x
)Is this a regression?
No.
Description
There are 3500 components/modules in this app. Everything lazy-loaded. When I run
ng serve
and edit any one file. The rebuild should be shorter because the lazy chunks have not changed.🔬 Minimal Reproduction
git clone https://github.com/doggy8088/ng-cli-800-3500-components.git cd ng-cli-800-3500-components npm install ng serve
Edit the
src/app/features/page0001/page0001.component.ts
file, it will wait more than 40 seconds to complete. It should be shorter.🔥 Exception or Error
No error. It just slower than expected.
🌍 Your Environment
Anything else relevant?
N/A
The text was updated successfully, but these errors were encountered: