You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Windows 10
Versions. Please run ng --version. If there's nothing outputted, please run
in a Terminal: node --version and paste the result here:
angular-cli: 1.0.0-beta.11-webpack.8
node: 6.3.0
os: win32 x64
Repro steps. Was this an app that wasn't created using the CLI? What change did you
do on your code? etc.
app created with 1.0.0-beta.11-webpack.2 and later on upgraded to 1.0.0-beta.11-webpack.8 with appropriate changes.
The log given by the failure. Normally this include a stack trace and some
more information.
The slow behavious is observed when upgraded from 1.0.0-beta.11-webpack.2 to 1.0.0-beta.11-webpack.8
I have experience this on two operating systems, windows 7 and windows 10. Has anyone else experieced this? For me rebuilds are dramatically slow, taking roughly 7-8 seconds which on same machine with cli version webpack.2 was taking rougly 2-3 seconds.
+1 also quite slow on linux x64 after I moved my assets from the app folder to the appropriate assets folder, it now optimizes the assets folder every time I make a change to any of the code which seems to be the reason for the added delay.
@hanvyj build or rebuild? Our build times are now at nearly two minutes. Rebuilds are at 3s for no changes up to 30s in some cases. Did some profiling and it is mostly the source maps which are insanely slow. Disable them and builds become way faster...while debugging becomes a nightmare. All in all, you are still quite lucky I think. If things get really bad, there is always the option of ejecting. We have been considering it for a while.
I played with a project that split the vendor bundle into a separate webpack script that didn't watch for changes. (it's rarely changed), I think it was all dealing with webpack without the CLI though. Is something like that possible with the CLI (it adds so much functionality and ease of use I'd take it over a faster build and setting up webpack myself!)
Ah, so I should turn it off when developing. I guess I'd have to be careful to not cause any changes that would break an AoT production build. Gets it down to 36 seconds build time, 5 second rebuild time - which is great!
I guess I'll have to be careful not to do anything that could break AoT though (interestingly, turning it off highlighted a few errors, a service not marked as @Injectable(), no idea how that worked with AoT on!).
@cyberprodigy please open a separate issue including the information from the template so that we can fully assist you. Please also be sure that you are using the latest version (1.0.0 at this time).
Thank you.
Build takes 30 seconds on average.
Yes, I'm using ng serve, without any options and it was slow from the very beginning (clean ng cli).
I'm using Vagrant for development environment. I guess it could slow it down a bit, but I wouldn't expect this much.
It seems that it is compiling all modules everytime (even those from /node_modules) and doing chunk asset optimizations (probably for all assets). Is it developed that way or I am missing something in my configuration?
What @clydin said, basically. Build times will not improve much (although webpack itself is reporting improvements so we shall see); rebuilding time should be much faster. Keep your process running and you'll see improvements.
Locking this conversation down. This issue has been resolved a long time ago.
Activity
[-]Rebuild Slow[/-][+]Rebuild extremely slow[/+]stellasoft-george commentedon Sep 7, 2016
+1 Rebuilds are extremely slow for me on OSX 10.11.6
RicardoVaranda commentedon Sep 8, 2016
+1 also quite slow on linux x64 after I moved my assets from the app folder to the appropriate assets folder, it now optimizes the assets folder every time I make a change to any of the code which seems to be the reason for the added delay.
filipesilva commentedon Sep 16, 2016
@TheLarkInn can you weigh in? It seems related with
CopyWebpackPlugin.intellix commentedon Sep 28, 2016
Would DLL loading for vendor items help here? They must be 90% of bundle size
254 remaining items
hccampos commentedon Mar 24, 2017
@hanvyj build or rebuild? Our build times are now at nearly two minutes. Rebuilds are at 3s for no changes up to 30s in some cases. Did some profiling and it is mostly the source maps which are insanely slow. Disable them and builds become way faster...while debugging becomes a nightmare. All in all, you are still quite lucky I think. If things get really bad, there is always the option of ejecting. We have been considering it for a while.
hanvyj commentedon Mar 24, 2017
Rebuild. The original build is a little longer. I've seen it as low as 46, but just then it was 88:
I'll try enabling source maps only if I'm doing some serious debugging. Thanks.
There's probably some other optimizations I can do, I'll google around a bit.
clydin commentedon Mar 24, 2017
@hanvyj What's your command line look like?
hanvyj commentedon Mar 24, 2017
I run it with an NPM command that calls "ng serve --aot=true --proxy-config proxy.conf.json":
I played with a project that split the vendor bundle into a separate webpack script that didn't watch for changes. (it's rarely changed), I think it was all dealing with webpack without the CLI though. Is something like that possible with the CLI (it adds so much functionality and ease of use I'd take it over a faster build and setting up webpack myself!)
hccampos commentedon Mar 24, 2017
That explains it. AoT is extremely slow, too slow to be used while developing.
hanvyj commentedon Mar 24, 2017
Ah, so I should turn it off when developing. I guess I'd have to be careful to not cause any changes that would break an AoT production build. Gets it down to 36 seconds build time, 5 second rebuild time - which is great!
I guess I'll have to be careful not to do anything that could break AoT though (interestingly, turning it off highlighted a few errors, a service not marked as @Injectable(), no idea how that worked with AoT on!).
Seems my method of creating Modal dialogs is completely broken, but there's a guide here I'll give a good read: https://angular.io/docs/ts/latest/cookbook/aot-compiler.html#!#jit-dev-aot-prod
cyberprodigy commentedon Apr 23, 2017
I have hello world project created with
ng new HelloWorld
then I run ng build.
Takes 62 seconds.
Then I change a line in hello world
I run ng build, and it takes 62 seconds again. Is this normal? Is this how you develop?
clydin commentedon Apr 23, 2017
@cyberprodigy please open a separate issue including the information from the template so that we can fully assist you. Please also be sure that you are using the latest version (1.0.0 at this time).
Thank you.
MickL commentedon Apr 23, 2017
@cyberprodigy it takes like 1 second on my machine with latest cli. You may dont have the latest installed.
ipassynk commentedon Apr 23, 2017
I upgraded a project from v2.4.10(angular-cli@1.0.0-beta.20-4) to 4.0.0 ( "@angular/cli": "1.0.0") and unfortunately don't see much improvements
here is stat from new cli:
and here is from old one:
jmlivingston commentedon Apr 24, 2017
@cyberprodigy - If you are running it locally for development purposes, you should be using "ng serve", not "ng build".
flackjap commentedon Apr 26, 2017
I'm having the same issues.
Build takes 30 seconds on average.
Yes, I'm using ng serve, without any options and it was slow from the very beginning (clean ng cli).
I'm using Vagrant for development environment. I guess it could slow it down a bit, but I wouldn't expect this much.
It seems that it is compiling all modules everytime (even those from /node_modules) and doing chunk asset optimizations (probably for all assets). Is it developed that way or I am missing something in my configuration?
@angular/cli: 1.0.0
node: 6.10.0
os: linux x64
@angular/common: 4.0.2
@angular/compiler: 4.0.2
@angular/core: 4.0.2
@angular/forms: 4.0.2
@angular/http: 4.0.2
@angular/platform-browser: 4.0.2
@angular/platform-browser-dynamic: 4.0.2
@angular/router: 4.0.2
@angular/cli: 1.0.0
@angular/compiler-cli: 4.0.2
clydin commentedon Apr 26, 2017
Ng serve watches for changes and rebuilds only the changed chunks automatically. Killing the process each time forces a full build.
hansl commentedon Apr 26, 2017
What @clydin said, basically. Build times will not improve much (although webpack itself is reporting improvements so we shall see); rebuilding time should be much faster. Keep your process running and you'll see improvements.
Locking this conversation down. This issue has been resolved a long time ago.