ngcc is extremely slow with --use-program-dependencies
See original GitHub issueStarting with Angular 10, we observed very slow ng serve
/ ng build
startup times when the Angular CLI ngcc
initial run check (https://github.com/angular/angular-cli/commit/1396ed4533d04a434b943eab48e0c6eaa4740c95) doesn’t pass, i.e. when the CLI runs ngcc
, even though we already run ngcc
as a postinstall
hook in our current configuration.
Upon looking into it, it seems that it comes down to the --use-program-dependencies
flag that the Angular CLI started to use in https://github.com/angular/angular-cli/commit/6670af2d3329959efb0e0831cf2105d9591d7475.
Without that flag, ngcc
takes under 2 seconds to re-run in our project:
$ time ./node_modules/.bin/ngcc --first-only --create-ivy-entry-points --async --tsconfig src/tsconfig.app.json --loglevel debug | ts '[%Y-%m-%d %H:%M:%S]'
[2020-10-13 14:43:19] Debug: Forking unlocker child-process
[2020-10-13 14:43:19] Debug: Attemping to write lock-file at /<app>/node_modules/@angular/compiler-cli/ngcc/__ngcc_lock_file__ with PID 84881
[2020-10-13 14:43:19] Debug: Written lock-file at /<app>/node_modules/@angular/compiler-cli/ngcc/__ngcc_lock_file__ with PID 84881
[2020-10-13 14:43:19] Debug: Running ngcc on ClusterExecutor (using 4 worker processes).
[2020-10-13 14:43:19] Debug: Analyzing entry-points...
[2020-10-13 14:43:19] Debug: Entry-point manifest found for /<app>/node_modules so loading entry-point information directly.
[2020-10-13 14:43:19] Debug: Starting unlocker at process 84883 on behalf of process 84881
[2020-10-13 14:43:19] Debug: The lock-file path is /<app>/node_modules/@angular/compiler-cli/ngcc/__ngcc_lock_file__
[2020-10-13 14:43:19] Debug: Reading entry-points using the manifest entries took 0.5s.
[2020-10-13 14:43:19] Debug: No manifest found for /<app>src/@freelancer so walking the directories for entry-points.
[2020-10-13 14:43:19] Debug: Walking /<app>/src/@freelancer for entry-points took 0.1s.
Warning: Entry point 'ngx-highlightjs' contains deep imports into '/<app>/node_modules/highlight.js/lib/highlight.js'. This is probably not a problem, but may cause the compilation of entry points to be out of order.
[2020-10-13 14:43:19] Debug: Invalid entry-point /<app>/node_modules/@angular/common/upgrade. It is missing required dependencies:
[2020-10-13 14:43:19] - @angular/upgrade/static
[2020-10-13 14:43:19] Debug: Invalid entry-point /<app>/node_modules/@angular/router/upgrade. It is missing required dependencies:
[2020-10-13 14:43:19] - @angular/upgrade/static
[2020-10-13 14:43:19] Debug: Skipping @angular/core : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/common : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @agm/core : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @agm/snazzy-info-window : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/animations : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/animations/browser : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/animations/browser/testing : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/cdk/clipboard : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/cdk/platform : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/cdk/bidi : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/cdk/collections : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/cdk/scrolling : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/cdk/drag-drop : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/common/http : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/common/http/testing : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/fire : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/router : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/platform-browser : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/fire/analytics : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/fire/auth : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/fire/auth-guard : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/fire/database : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/fire/firestore : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/fire/functions : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/fire/messaging : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/fire/performance : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/fire/remote-config : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/fire/storage : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/cdk/keycodes : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/cdk/observers : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/cdk/a11y : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/platform-browser/animations : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/forms : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/core : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/cdk/portal : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/cdk/overlay : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/form-field : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/autocomplete : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/badge : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/cdk/layout : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/bottom-sheet : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/button-toggle : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/card : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/checkbox : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/chips : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/button : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/dialog : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/cdk/text-field : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/input : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/datepicker : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/cdk/accordion : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/expansion : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/grid-list : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/icon : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/icon/testing : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/divider : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/list : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/menu : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/progress-bar : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/progress-spinner : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/radio : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/sidenav : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/slide-toggle : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/slider : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/snack-bar : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/cdk/stepper : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/stepper : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/cdk/table : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/select : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/tooltip : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/paginator : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/sort : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/table : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/tabs : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/toolbar : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/cdk/tree : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/material/tree : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/core/testing : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/platform-browser-dynamic : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/platform-browser/testing : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/compiler/testing : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/platform-browser-dynamic/testing : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/platform-server : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/platform-server/testing : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/common/testing : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/router/testing : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/service-worker : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @angular/service-worker/config : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @laurentgoudet/ionic-native-core : main (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @laurentgoudet/ionic-native-background-geolocation : main (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @laurentgoudet/ionic-native-facebook : main (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @laurentgoudet/ionic-native-keychain : main (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @laurentgoudet/ionic-native-open-native-settings : main (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @laurentgoudet/ionic-native-sign-in-with-apple : main (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @nguniversal/express-engine/tokens : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @laurentgoudet/ngx-cookie : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @ngrx/store : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @ngrx/effects : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @ngrx/effects/testing : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @ngrx/store/testing : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @ngrx/store-devtools : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @nguniversal/common : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @nguniversal/common/engine : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @nguniversal/common/tokens : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping @nguniversal/express-engine : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping angular-resizable-element : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping ngx-captcha : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping ngx-highlightjs : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping ngx-image-cropper : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping ngx-perfect-scrollbar : main (already compiled).
[2020-10-13 14:43:19] Debug: Skipping ngx-videogular : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping preboot : es2015 (already compiled).
[2020-10-13 14:43:19] Debug: Skipping saturn-datepicker : fesm2015 (already compiled).
[2020-10-13 14:43:19] Debug: Analyzed 113 entry-points in 0.6s. (Total tasks: 0)
[2020-10-13 14:43:19] Debug: Attempting to remove lock-file at /<app>/node_modules/@angular/compiler-cli/ngcc/__ngcc_lock_file__.
[2020-10-13 14:43:19] Debug: PIDs match (84881), so removing /<app>/node_modules/@angular/compiler-cli/ngcc/__ngcc_lock_file__.
[2020-10-13 14:43:19] Debug: Run ngcc in 1s.
[2020-10-13 14:43:19] Debug: Attempting to remove lock-file at /<app>/node_modules/@angular/compiler-cli/ngcc/__ngcc_lock_file__.
[2020-10-13 14:43:19] Debug: The lock-file at /<app>/node_modules/@angular/compiler-cli/ngcc/__ngcc_lock_file__ was already removed.
real 0m1.927s
user 0m1.108s
sys 0m0.524s
With that flag, ngcc
takes over 17 minutes on the same host:
$ time ./node_modules/.bin/ngcc --first-only --create-ivy-entry-points --async --use-program-dependencies --tsconfig src/tsconfig.app.json --loglevel debug | ts '[%Y-%m-%d %H:%M:%S]'
[2020-10-13 14:21:46] Debug: Forking unlocker child-process
[2020-10-13 14:21:46] Debug: Attemping to write lock-file at /<app>/node_modules/@angular/compiler-cli/ngcc/__ngcc_lock_file__ with PID 83786
[2020-10-13 14:21:46] Debug: Written lock-file at /<app>/node_modules/@angular/compiler-cli/ngcc/__ngcc_lock_file__ with PID 83786
[2020-10-13 14:21:46] Debug: Running ngcc on ClusterExecutor (using 4 worker processes).
[2020-10-13 14:21:46] Debug: Analyzing entry-points...
[2020-10-13 14:21:46] Debug: Using the program from /<app>/src/tsconfig.app.json to seed the entry-point finding.
[2020-10-13 14:21:46] Debug: Collecting dependencies from the following files:
... 2174 files from our project are appearing here ..
[2020-10-13 14:21:46] Debug: Starting unlocker at process 83790 on behalf of process 83786
[2020-10-13 14:21:46] Debug: The lock-file path is /<app>/node_modules/@angular/compiler-cli/ngcc/__ngcc_lock_file__
[2020-10-13 14:38:50] Debug: Entry-point manifest found for /<app>/node_modules so loading entry-point information directly.
[2020-10-13 14:38:50] Debug: Reading entry-points using the manifest entries took 0.5s.
[2020-10-13 14:38:50] Debug: No manifest found for /<app>/src/@freelancer so walking the directories for entry-points.
[2020-10-13 14:38:50] Debug: Walking /<app>/src/@freelancer for entry-points took 0.1s.
[2020-10-13 14:38:50] Debug: Skipping @angular/core : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/common : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/router : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @laurentgoudet/ionic-native-core : main (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @laurentgoudet/ionic-native-keychain : main (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @nguniversal/express-engine/tokens : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @laurentgoudet/ngx-cookie : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/service-worker : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @laurentgoudet/ionic-native-sign-in-with-apple : main (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/forms : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping ngx-captcha : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @ngrx/store : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @ngrx/effects : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @laurentgoudet/ionic-native-open-native-settings : main (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @agm/core : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @agm/snazzy-info-window : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/platform-browser : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping ngx-image-cropper : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping ngx-perfect-scrollbar : main (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/cdk/platform : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/cdk/keycodes : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/cdk/bidi : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/cdk/portal : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/animations : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/cdk/collections : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/cdk/scrolling : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/cdk/overlay : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/cdk/observers : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/cdk/a11y : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/animations/browser : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/platform-browser/animations : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/material/core : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/material/dialog : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/material/form-field : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/cdk/text-field : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/material/input : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/material/button : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping saturn-datepicker : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping ngx-videogular : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/cdk/layout : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @laurentgoudet/ionic-native-facebook : main (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @laurentgoudet/ionic-native-background-geolocation : main (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @ngrx/store-devtools : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/fire : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/fire/messaging : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping preboot : es2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/common/http : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/platform-browser-dynamic : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping @angular/platform-server : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Skipping angular-resizable-element : fesm2015 (already compiled).
[2020-10-13 14:38:50] Debug: Analyzed 50 entry-points in 1024.4s. (Total tasks: 0)
[2020-10-13 14:38:50] Debug: Attempting to remove lock-file at /<app>/node_modules/@angular/compiler-cli/ngcc/__ngcc_lock_file__.
[2020-10-13 14:38:50] Debug: PIDs match (83786), so removing /<app>/node_modules/@angular/compiler-cli/ngcc/__ngcc_lock_file__.
[2020-10-13 14:38:50] Debug: Run ngcc in 1025s.
[2020-10-13 14:38:50] Debug: Attempting to remove lock-file at /<app>/node_modules/@angular/compiler-cli/ngcc/__ngcc_lock_file__.
[2020-10-13 14:38:50] Debug: The lock-file at /<app>/node_modules/@angular/compiler-cli/ngcc/__ngcc_lock_file__ was already removed.
real 17m5.862s
user 10m36.781s
sys 6m20.486s
Almost all the time (minus 2 seconds) is spent between these 2 lines:
[2020-10-13 14:21:46] Debug: The lock-file path is /<app>/node_modules/@angular/compiler-cli/ngcc/__ngcc_lock_file__
[2020-10-13 14:38:50] Debug: Entry-point manifest found for /<app>/node_modules so loading entry-point information directly.
It seems that during that period ngcc
is working off a single thread (100% CPU), even though the compilation itself is spawn across multiple workers (when packages need to be compiled).
This might be due to the size of our project (2174 files as per the logs), but the initial ngcc
compilation, which as I understand it --use-program-dependencies
is meant to speed up, is only taking 1-2 minutes, so I’m not sure what’s going on. I suspect this is behind other reported bugs around Angular 10 performance regressions like https://github.com/angular/angular-cli/issues/18854.
As a workaround disabling the Angular CLI ngcc
compilation through the BAZEL_TARGET=1
hack found in https://github.com/angular/angular/issues/38216 does the trick, as as mentioned we currently run ngcc
as a postinstall
hook anyway.
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (6 by maintainers)
Top GitHub Comments
@laurentgoudet The fix has been released in 10.1.6 🥳
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.