angular-cli: ng serve recompile time very slow
🐞 Bug report
Command (mark with an x
)
- [ ] serve
Is this a regression?
Yes, the previous version in which this bug was not present was: ....Description
A clear and concise description of the problem...ng serve recompile time very slow. It spend about 10s to recompile althought I only change one space on css ~~
🔬 Minimal Reproduction
🔥 Exception or Error
🌍 Your Environment
Angular CLI: 8.3.3
Node: 10.16.3
OS: win32 x64
Angular: 8.2.5
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.803.3
@angular-devkit/build-angular 0.803.3
@angular-devkit/build-optimizer 0.803.3
@angular-devkit/build-webpack 0.803.3
@angular-devkit/core 8.3.3
@angular-devkit/schematics 8.3.3
@angular/cli 8.3.3
@ngtools/webpack 8.3.3
@schematics/angular 8.3.3
@schematics/update 0.803.3
rxjs 6.4.0
typescript 3.5.3
webpack 4.39.2
Anything else relevant?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 19 (4 by maintainers)
I’m unable to replicate the behavior you are seeing. First change below is a TS file, second a CSS file, and third an HTML file.
I’m sorry, but we can’t reproduce the problem following the instructions you provided. Remember that we have a large number of issues to resolve, and have only a limited amount of time to reproduce your issue. Short, explicit instructions make it much more likely we’ll be able to reproduce the problem so we can fix it.
If the problem persists, please open a new issue following our submission guidelines.
A good way to make a minimal repro is to create a new app via
ng new repro-app
and add the minimum possible code to show the problem. Then you can push this repository to github and link it here.@sodepr, you might also have an anti-virus that is scanning files when being accessed and is slowing the compilation.
I tried your reproduction and here’s the timings
Also, having the entire
fontawesome
as part of the your assets doesn’t seem right as it includes files that will never be used by your application and are copied redundantly.There’s still over 1500 files and 22 MB in the assets folder. This is going to take some time to copy.
Looks like the large amount of assets is causing the slowdown. Can you remove non-essential files from the assets directory?
Hi @sodepr. thanks for opening the issue. Is there a way you can share your project or a reproduction so that we can take a look at?
You can read here why this is needed.
This might be related to your directory structure so its really important to get an accurate repro to diagnose this.