-
Notifications
You must be signed in to change notification settings - Fork 12k
Extremely slow ng serve performance [Source Map compiling] #13087
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm having similar performance problems with |
Hi @djleonskennedy, does turning off the sourceMaps result in good rebuild times? Also is When you say large project, can you kindly provide some data such as number of Ts files, Css/Scss files etc? Thanks. |
Hi, With a fresh project (ng new with all default parameters),
After reverting
|
@alan-agius4 I'll check it |
@alan-agius4 I have seen this issue before but I don't think it's related to mine... (it's not aot but jit with serve) But thanks for the reply :-) |
@alan-agius4 Summary of out app We have SharedModule for common components, pipes etc. Could you say what i can provide for you to get more info? Thank you :) |
Hi, Thanks for the info provided. If you don't mind can you try a couple of things that will help is determine what's the root cause.
|
@alan-agius4 will try asap, thank you |
Hello, package.json/devDependencies : and now it is fast (1.2 sec).... (without aot) For me, it is still ~50 seconds for ng serve .. but then a change is 1 second instead of 12 seconds with 0.11 My Config : Angular CLI: 7.1.1 Package Version@angular-devkit/architect 0.6.8 |
I have made some test with What I see is
|
@mselerin do you see the same perf regression when using @ngtools/webpack 7.0.6? |
@alan-agius4 After changed file compiled, compile start compile these files
why is it happening ? |
@alan-agius4 Also i reverted our project to commit where we had version 6.1.0, and all compiles fast on ng serve |
I'm using @ngtools/webpack 7.0.7 but @angular-devkit/build-angular 0.10.7. |
We have the same issue, from fromerly about 5-10s to now 15-30s I don't know which version introduced this exactly. I think @angular/cli 7.1* What exactly do you need from us to give more insights on this. There is definitely something. |
Hi all, one of the performance regression was fixed in 7.1.2 with #13133. If the problem persists it would be great if you could provide a CPU profiling snapshot. You can see how to do this in #13087 (comment) Thanks. |
"@angular-devkit/build-angular": "0.11.2",> ng serve --configuration hmr --source-map=false --proxy-config proxy.json
NOTICE: Hot Module Replacement (HMR) is enabled for the dev server.
The project will still live reload when HMR is enabled,
but to take advantage of HMR additional application code is required'
(not included in an Angular CLI project by default).'
See https://webpack.js.org/guides/hot-module-replacement
for information on working with HMR for Webpack.
To disable this warning use "hmrWarning: false" under "serve" options in "angular.json".
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
Date: 2018-12-07T13:22:49.019Z
Hash: b416e7853a5322072f25
Time: 9421ms
chunk {main} main.js (main) 188 kB [initial] [rendered]
chunk {polyfills} polyfills.js (polyfills) 223 kB [initial] [rendered]
chunk {runtime} runtime.js (runtime) 31 kB [entry] [rendered]
chunk {styles} styles.js (styles) 91.8 kB [initial] [rendered]
chunk {vendor} vendor.js (vendor) 7.6 MB [initial] [rendered]
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
Date: 2018-12-07T13:22:57.878Z - Hash: 90f108e5324c906a6e8b - Time: 4662ms
3 unchanged chunks
chunk {main} main.js, main.b416e7853a5322072f25.hot-update.js (main) 188 kB [initial] [rendered]
chunk {runtime} runtime.js (runtime) 31 kB [entry] [rendered]
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
Date: 2018-12-07T13:23:00.790Z - Hash: a20a843fc0e253f24cbe - Time: 1222ms
3 unchanged chunks
chunk {main} main.js, main.90f108e5324c906a6e8b.hot-update.js (main) 188 kB [initial] [rendered]
chunk {runtime} runtime.js (runtime) 31 kB [entry] [rendered]
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
Date: 2018-12-07T13:23:04.032Z - Hash: 3125448d364b4d38d1db - Time: 1405ms
3 unchanged chunks
chunk {main} main.js, main.a20a843fc0e253f24cbe.hot-update.js (main) 188 kB [initial] [rendered]
chunk {runtime} runtime.js (runtime) 31 kB [entry] [rendered]
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
Date: 2018-12-07T13:23:06.921Z - Hash: 8c156bd1d0d7ebd09ef6 - Time: 1020ms
3 unchanged chunks
chunk {main} main.js, main.3125448d364b4d38d1db.hot-update.js (main) 188 kB [initial] [rendered]
chunk {runtime} runtime.js (runtime) 31 kB [entry] [rendered]
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
Date: 2018-12-07T13:23:10.300Z - Hash: 234b00c1d341b51f980b - Time: 1210ms
3 unchanged chunks
chunk {main} main.js, main.8c156bd1d0d7ebd09ef6.hot-update.js (main) 188 kB [initial] [rendered]
chunk {runtime} runtime.js (runtime) 31 kB [entry] [rendered]
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
Date: 2018-12-07T13:23:13.548Z - Hash: 970a99eb904f833c623e - Time: 1148ms
3 unchanged chunks
chunk {main} main.js, main.234b00c1d341b51f980b.hot-update.js (main) 188 kB [initial] [rendered]
chunk {runtime} runtime.js (runtime) 31 kB [entry] [rendered]
ℹ 「wdm」: Compiled successfully. "@angular-devkit/build-angular": "0.10.7",> ng serve --configuration hmr --source-map=false --proxy-config proxy.json
NOTICE: Hot Module Replacement (HMR) is enabled for the dev server.
The project will still live reload when HMR is enabled,
but to take advantage of HMR additional application code is required'
(not included in an Angular CLI project by default).'
See https://webpack.js.org/guides/hot-module-replacement
for information on working with HMR for Webpack.
To disable this warning use "hmrWarning: false" under "serve" options in "angular.json".
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
Date: 2018-12-07T13:23:50.468Z
Hash: 65b0847d76a51bfbd8b2
Time: 9321ms
chunk {main} main.js (main) 188 kB [initial] [rendered]
chunk {polyfills} polyfills.js (polyfills) 223 kB [initial] [rendered]
chunk {runtime} runtime.js (runtime) 30.9 kB [entry] [rendered]
chunk {styles} styles.js (styles) 91.8 kB [initial] [rendered]
chunk {vendor} vendor.js (vendor) 7.6 MB [initial] [rendered]
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
Date: 2018-12-07T13:23:57.692Z - Hash: fd7e8f2bbafcc6fc6043 - Time: 2466ms
3 unchanged chunks
chunk {main} main.js, main.65b0847d76a51bfbd8b2.hot-update.js (main) 188 kB [initial] [rendered]
chunk {runtime} runtime.js (runtime) 30.9 kB [entry] [rendered]
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
Date: 2018-12-07T13:23:59.870Z - Hash: 025934ad5de9f53cd69a - Time: 171ms
3 unchanged chunks
chunk {main} main.js, main.fd7e8f2bbafcc6fc6043.hot-update.js (main) 188 kB [initial] [rendered]
chunk {runtime} runtime.js (runtime) 30.9 kB [entry] [rendered]
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
Date: 2018-12-07T13:24:03.478Z - Hash: e2286f4ba43aaf5ee50c - Time: 142ms
3 unchanged chunks
chunk {main} main.js, main.025934ad5de9f53cd69a.hot-update.js (main) 188 kB [initial] [rendered]
chunk {runtime} runtime.js (runtime) 30.9 kB [entry] [rendered]
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
Date: 2018-12-07T13:24:05.823Z - Hash: 02437b7e4b548697a579 - Time: 152ms
3 unchanged chunks
chunk {main} main.js, main.e2286f4ba43aaf5ee50c.hot-update.js (main) 188 kB [initial] [rendered]
chunk {runtime} runtime.js (runtime) 30.9 kB [entry] [rendered]
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
Date: 2018-12-07T13:24:07.655Z - Hash: bbfc71466b67d8a7fe85 - Time: 156ms
3 unchanged chunks
chunk {main} main.js, main.02437b7e4b548697a579.hot-update.js (main) 188 kB [initial] [rendered]
chunk {runtime} runtime.js (runtime) 30.9 kB [entry] [rendered]
ℹ 「wdm」: Compiled successfully. |
Short version profiling "@angular-devkit/build-angular": "0.11.2",Full log are about 3.3MB
|
@igorivaniuk it would be great if you could upload the log somewhere and provide link here. |
@alan-agius4 I've updated to 0.11.2 i've started with then i just added and get 90 sec recompile with next log log file: https://dropmefiles.com/yxp7B |
@alan-agius4 here full log https://dropmefiles.com/l1H1Y |
@alan-agius4 Also the longest part
Why is it so long ? I guess it should not be recompiled each time |
Same issue. |
@AndriiDidkivsky downgrade npm i @angular-devkit/build-angular@0.10.7 --save-dev |
@igorivaniuk sure? have same issue with 0.10.6 |
@djleonskennedy i use 0.10.7 for now, and all perfectly.
Date: 2018-12-11T12:37:27.240Z - Hash: 4d7e5deaa20b9ad72c9e - Time: 109ms
3 unchanged chunks
chunk {main} main.js, main.8977aecd0bb97b10f1a4.hot-update.js (main) 199 kB [initial] [rendered]
chunk {runtime} runtime.js (runtime) 30.9 kB [entry] [rendered]
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
Date: 2018-12-11T12:37:50.575Z - Hash: 00a3ec9ecfa63f5286fe - Time: 107ms
3 unchanged chunks
chunk {main} main.js, main.4d7e5deaa20b9ad72c9e.hot-update.js (main) 199 kB [initial] [rendered]
chunk {runtime} runtime.js (runtime) 30.9 kB [entry] [rendered]
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
Date: 2018-12-11T12:47:48.582Z - Hash: 91cd5715b1a62a6f5c3f - Time: 1736ms
3 unchanged chunks
chunk {main} main.js, main.00a3ec9ecfa63f5286fe.hot-update.js (main) 202 kB [initial] [rendered]
chunk {runtime} runtime.js (runtime) 30.9 kB [entry] [rendered]
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
Date: 2018-12-11T12:48:18.096Z - Hash: 0547970366cf928e0100 - Time: 155ms
3 unchanged chunks
chunk {main} main.js, main.91cd5715b1a62a6f5c3f.hot-update.js (main) 202 kB [initial] [rendered]
chunk {runtime} runtime.js (runtime) 30.9 kB [entry] [rendered]
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
Date: 2018-12-11T12:49:27.900Z - Hash: 3dbe60a6ed940a2ca8bd - Time: 112ms
3 unchanged chunks
chunk {main} main.js, main.0547970366cf928e0100.hot-update.js (main) 202 kB [initial] [rendered]
chunk {runtime} runtime.js (runtime) 30.9 kB [entry] [rendered]
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
Date: 2018-12-11T12:49:58.583Z - Hash: a718ac8b13c6a39d89a9 - Time: 210ms
3 unchanged chunks
chunk {main} main.js, main.3dbe60a6ed940a2ca8bd.hot-update.js (main) 202 kB [initial] [rendered]
chunk {runtime} runtime.js (runtime) 30.9 kB [entry] [rendered]
ℹ 「wdm」: Compiled successfully.
|
@igorivaniuk how big your project ? |
@djleonskennedy small, about 20 components. |
We have a big project (75k LoC), with "@angular-devkit/build-angular": "~0.11.1", e have recompile time about 20s with version "@angular-devkit/build-angular": "^0.10.7" it's about 6s |
Hi all, I've been looking into this regression in #13102 (comment). At this point I'm very confident that these two issues are the same and it's better if we continue the discussion there. Please subscribe to that issue for further updates. Meanwhile, using If you have a medium/large size project it will might help to increase the node memory limit (#5618 (comment)). |
@filipesilva Seems fixed in 0.12.0, thank you |
Hi, after upgrading our application to angular8, i have similar problems with ng server. In my case ng serve hangs / hold on and nothing happens.
Package Version@angular-devkit/architect 0.801.3 i have no idea how to debug this problem. Our projects include 8 internal library and the main application has ~90k lines of code. Any ideas how to get more information about the process or how to get more verbose information. Thanks! |
@moohkooh try |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Command (mark with an
x
)Versions
npm: 5.6.0
Angular CLI: 7.0.6
Node: 8.9.4
OS: win32 x64
Angular: 7.0.4
... animations, common, compiler, core, forms, http
... platform-browser, platform-browser-dynamic, router
Package Version
@angular-devkit/architect 0.10.6
@angular-devkit/build-angular 0.10.6
@angular-devkit/build-optimizer 0.10.6
@angular-devkit/build-webpack 0.10.6
@angular-devkit/core 7.0.6
@angular-devkit/schematics 7.0.6
@angular/cdk 7.1.0
@angular/cli 7.0.6
@angular/compiler-cli 7.1.0
@angular/flex-layout 7.0.0-beta.19
@angular/language-service 7.1.0
@ngtools/webpack 7.0.6
@schematics/angular 7.0.6
@schematics/update 0.10.6
rxjs 6.3.3
typescript 3.1.6
webpack 4.19.1
Repro steps
Needs LARGE project, NOT empty project with ng new ...,
run npm start
make changes
wait for 10 min
The log given by the failure
N/A
Desired functionality
We have big project, and we've faced problem with ng serve updating/recompiling during update.
Now faster to re-run ng serve instead wait for rebuilding
Mention any other details that might be useful
we use simple ng serve without AOT or PROD flag
The text was updated successfully, but these errors were encountered: