CLI performance degradation since v1.0.0-beta.8 upgrade
Please provide us with the following information:
- OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Windows 8
- Versions.
Node v.4.1.1 CLI v1.0.0-beta.8
- Repro steps. Was this an app that wasn't created using the CLI? What change did you do on your code? etc.
The app was created with CLI v1.0.0-beta.5. I updated to CLI 0.8 and noticed significant slowdowns with:
- transpile/build time......: average initial build 130s or 2:10m (when starting with ng serve, even with administrator privileges for cmd terminal)
- live reload time.............: average live reload/build time 15s (when saving a file)
- browser load times.......: average browser load time 15s (using chrome, after CLI has created a build)
I can live with the initial build taking 2 mins. But every time I make a change/save a file for it to take 30s before I can see something on screen is a deal breaker. It's impossible to work with and it brings memories of pre Y2K :)
- The log given by the failure. Normally this include a stack trace and some more information.
CLI log on the cmd terminal:
Livereload server on http://localhost:49156 Serving on http://localhost:4200/
Build successful - 130710ms.
Slowest Trees....................................| Total ----------------------------------------------+--------------------- vendor...............................................| 88247ms BroccoliTypeScriptCompiler..............| 21966ms Funnel..............................................| 7290ms BroccoliMergeTrees.........................| 7153ms
file changed app+view\element-menu\element-info\element-info.component.ts
Build successful - 14613ms.
Slowest Trees....................................| Total ----------------------------------------------+--------------------- BroccoliTypeScriptCompiler...............| 11643ms vendor................................................| 1117ms Funnel (9)..........................................| 1017ms (113 ms)
file changed app+view\element-menu\element-info\element-info.component.ts
Build successful - 15987ms.
Slowest Trees....................................| Total ----------------------------------------------+--------------------- BroccoliTypeScriptCompiler...............| 12259ms vendor................................................| 1120ms Funnel (9)..........................................| 1166ms (129 ms) BroccoliMergeTrees (2).....................| 967ms (483 ms)
Here is the image for the Chrome browser network tab to show how long it takes to load everything:
http://imgur.com/MHAmKtG
- Mention any other details that might be useful.
Am I doing something wrong in my setup? I've been working with ng2 for 2 months now and I just upgraded to CLI v1.0.0-beta.8. Before the beta.8 update, it was a little slow but certainly acceptable (given this is still beta). Now, it is totally unworkable.
It looks like the initial slowdown occurred right after I updated and it put the project in a slow-motion state. I restarted the computer just to see if it would make a difference and that brought it back to pre beta.8 load/build times.
Not sure if the update process made everything slow down but restarting the computer brings it back to normal build times. I'm closing this but will test and update when there is another release and I do the upgrade process again.
I'm re-opening this issue as the same symptoms are occurring again.
Just out of the blue the build/transpile times have shot up again. Same as with browser load times. Over 2 minutes to execute 'ng serve'. 15 seconds to transpile, 15 seconds to load in the browser. So 30s every time a change is made.
I haven't done anything out of the ordinary, was just working on it when I noticed the slowdowns.They just started happening out of nowhere. I've re-started the computer a bunch of times to see if that solves the problem again but it didn't.
It's as if the CLI just got into this slow-mo state...just out of the blue
At some point I'll try and re-install CLI again but in the meantime has anyone else encountered this issue?
Are you running ng serve as admin? In windows it works without admin, but there's a performance hit.
Yep, running it as admin. Have been since the start, about 2 months ago...Nothing has really changed in the last little while that would indicate to me the reason why sometimes it builds normally (3-5 secs) and sometimes it takes 30 secs.
All this started once I upgraded to beta-8 so I was just wondering if anyone else noticed it but is sounds like I may be the only one which to me would indicate that the issue is with my system/setup.
I'm going to try and run ng init once again to see if that does anything.
I have this issue too, it too slow to work with them
@hiepxanh some things to consider doing to speed it up:
- use CCLeaner (or similar) to clean up all temp files on your system
- restart computer
- keep laptop (if you're using a laptop) plugged in to a power outlet (avoid low-power mode)
- always run 'ng serve' from windows Command Prompt
- 'Run as Administrator', <- this is a must
- don't run it from your IDE's terminal (especially webstorm/IntelliJ)...grinds everything to a halt.
Oddly, the few items above have at times worked for me. Not consistently, but I can get the CLI to work with build times less than 2 secs
When it works it works great, when it gets stuck on something the CLI is unusable.
I'm still a big fan of it, I think it helps tremendously. Keep in mind this is still in beta and is bound to get better and better.
By the way, for the sake of anyone who reads this and recoils a bit at the "do all of your development work running as administrator" advice, the upcoming much discussed webpack approach should make that go away completely.
Closed as issue was made obsolete by #1455.
@filipesilva I'm running the latest release beta.10 (master branch, not webpack branch) and I can't really say that I'm seeing any performance improvements.
I'm under the assumption that the webpack stuff has made it to the master branch and that the webpack stuff is what's supposed to improve the performance on windows machines. Am I right?
My initial build times are still between 60 to 90 seconds and subsequent builds are anywhere between 5 and 15 seconds.
@nvitas you are right, yes. To install the webpack builds for now you have to follow the instructions in https://github.com/angular/angular-cli#webpack-preview-release-update
@filipesilva ahh, i missed that bit...thanks.
Will the webpack branch make it into master (and regular releases) eventually? Is this the way the CLI will work in the future or is webpack just an experiment at the moment?
I don't really want to go down the webpack route (and spend time refactoring a large project) only to find out 2 months from now that I gotta go back to where it is right now. I am tempted to try it out because of the performance improvement but little hesitant without knowing the long term goals for the CLI.
We're committed to the webpack build system at the moment and the only reason why it's not marked as latest in NPM is because we're ironing out some kinks.
I can't promise you that this won't change a year from now, but I'd be awfully surprised if it did change in the near future.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.