ng serve recompile time very slow
See original GitHub issueUsing ‘ng serve’ the webpack compile and recompile on code changes takes sometimes more than a minute.
Bug Report or Feature Request (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Versions.
@angular/cli: 1.0.0 node: 7.6.0 os: darwin x64 @angular/common: 4.0.3 @angular/compiler: 4.0.3 @angular/core: 4.0.3 @angular/forms: 4.0.3 @angular/http: 4.0.3 @angular/platform-browser: 4.0.3 @angular/platform-browser-dynamic: 4.0.3 @angular/router: 4.0.3 @angular/cli: 1.0.0 @angular/compiler-cli: 4.0.3
Repro steps.
- ng serve
- make change to any file (json, ts, html)
- wait for browser to reload…
The log given by the failure.
$xxxx ng serve
** NG Live Development Server is running on http://localhost:4200 **
Hash: 15921d5ca032c405df0a
Time: 43310ms
chunk {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 231 kB {5} [initial] [rendered]
chunk {1} main.bundle.js, main.bundle.js.map (main) 389 kB {4} [initial] [rendered]
chunk {2} scripts.bundle.js, scripts.bundle.js.map (scripts) 515 kB {5} [initial] [rendered]
chunk {3} styles.bundle.js, styles.bundle.js.map (styles) 11.4 kB {5} [initial] [rendered]
chunk {4} vendor.bundle.js, vendor.bundle.js.map (vendor) 3.61 MB [initial] [rendered]
chunk {5} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]
webpack: Compiled successfully.
webpack: Compiling…
Hash: 74ff0fd808586e648c85
Time: 52972ms
chunk {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 231 kB {5} [initial]
chunk {1} main.bundle.js, main.bundle.js.map (main) 389 kB {4} [initial] [rendered]
chunk {2} scripts.bundle.js, scripts.bundle.js.map (scripts) 515 kB {5} [initial]
chunk {3} styles.bundle.js, styles.bundle.js.map (styles) 11.4 kB {5} [initial]
chunk {4} vendor.bundle.js, vendor.bundle.js.map (vendor) 3.61 MB [initial]
chunk {5} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry]
webpack: Compiled successfully.
Desired functionality.
Compile and reload in 3-5 seconds or so
Mention any other details that might be useful.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:8
- Comments:21 (3 by maintainers)
Top Related StackOverflow Question
I have this problem too without having any images or nothing, just modules and stuff. When changing a line of css sometimes it can take 30 sec to recompile. Really, really annoying. Something is clearly wrong somewhere, but I can’t pinpoint what could be causing it as I’m following the official styleguide and best practices in general when writing my modules/components etc.
@BambiB no offense, but no serious developer should be developing on a HDD nowadays