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
@ngtools/webpack / ngc - 4x slower aot compilation from ng6 to ng7 #26674
Comments
This is the cpu profile with our previous angular release (angular 6.0.4) CPU-20181023T134145.cpuprofile.zip It runs through in 7s, so it's even a 4x slowdown in angular7. The computation inside typescript seems not to happen in the angular 6 version:
|
Duplicate of angular/angular-cli#12646 |
Indeed, the compiler is also included in my aot build. But that thread only focusses on the bigger build, not that the incremental aot watcher now takes 4x as long to recompile. And I observed the same 4x slowdown behavior with using |
I think the root cause for this issue is microsoft/TypeScript#28025, and there is a fix being worked on there in microsoft/TypeScript#28028. Thanks @thekiba the heads up! |
The latest typescript patch release contains a fix for this compile time regression. Can you please test it and file a new issue if you are still having problems? Thanks. |
But now code changes do not fall into the updated bundle in watch mode :`( |
can confirm, with angular 7.0.3 and typescript 3.1.6 the regression is gone. The watcher is as "fast" as before. |
angular 7.1.1 is 3x slower again. I guess at this point we stick with 7.0.4 and wait for ivy. |
@sod was this just updating Angular or also updating ngtools/webpack? If you updated them together, can you try updating individually please? Just to see which of the two causes the regression. |
hm indeed, just updating ngtools gives me the slowdown. Also using angular 7.1 with old ngtools 7.0.7 is significantly faster.
|
@sod thanks for compiling these numbers, I've opened angular/angular-cli#13102 for this. |
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. |
I'm submitting a...
[x] Regression (a behavior that used to work and stopped working in a new release)
[x] Performance issue
Current behavior
webpack incremental build with angular 7 takes ~30 seconds
in angular 6 it was ~10 seconds
package.json (angular 7.0.0, webpack 4.12)
It seems like typescript needs a lot of time for something:
CPU-20181023T113903.cpuprofile.zip
I observe the same behavior when running
ngc
directly instead of webpack.If i use
tsc
to compile the project, that watch/rebuild takes ~1second.Expected behavior
faster incremental build
Minimal reproduction of the problem with instructions
Can't share the repo, but if this ticket isn't sufficient, maybe I can strip down the project.
Environment
Angular version: 7.0.0
For Tooling issues:
The text was updated successfully, but these errors were encountered: