angularwebpackangular-cliangular2-cli

Angular 2 CLI so much time compiling


I'm working in a pretty big project and using Angular 2 with Angular 2 CLI beta 21. I am currently amazed about big compilation times and updating times.

Here you have an ng serve output. It's 44.8s.

$:ng serve
** NG Live Development Server is running on http://localhost:4200. **
32398ms building modules
94ms sealing
0ms optimizing
0ms basic module optimization
85ms module optimization
2480ms advanced module optimization
596ms basic chunk optimization
0ms chunk optimization
0ms advanced chunk optimization
1ms module and chunk tree optimization
284ms module reviving
5ms module order optimization
14ms module id optimization
273ms chunk reviving
7ms chunk order optimization
1036ms chunk id optimization
89ms hashing
3ms module assets processing
262ms chunk assets processing
27ms additional chunk assets processing
0ms recording
0ms additional asset processing
6836ms chunk asset optimization
188ms asset optimization
110ms emitting
Hash: 3bbcf7a50e73f9e25b19
Version: webpack 2.1.0-beta.25
Time: 44809ms

And then I changed a single character from a string. 23.38s.

webpack: bundle is now INVALID.
5111ms building modules
770ms sealing
0ms optimizing
0ms basic module optimization
64ms module optimization
3221ms advanced module optimization
951ms basic chunk optimization
0ms chunk optimization
0ms advanced chunk optimization
1353ms module and chunk tree optimization
317ms module reviving
4ms module order optimization
15ms module id optimization
302ms chunk reviving
4ms chunk order optimization
941ms chunk id optimization
88ms hashing
2ms module assets processing
117ms chunk assets processing
5ms additional chunk assets processing
0ms recording
1ms additional asset processing
5064ms chunk asset optimization
161ms asset optimization
75ms emitting
Hash: f159d87ee84758d5672b
Version: webpack 2.1.0-beta.25
Time: 23381ms

I know these aren't normal... ¿could it be?

If it isn't normal (as I hope), ¿what I'm doing wrong? ¿Is there any way to improve these times?

Thank you very much.


Solution

  • I've updated to angular-cli beta 24 (with deps) and update times has gone down to 4-8 seconds.