Angular CLI taking lot of time to build Angular Application
π Bug report
Command (mark with an x)
- [ ] new
- [x] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Is this a regression?
NoDescription
Angular CLI taking more than 15 minute to build Angular Application. Any way to speed up the build process keeping build preference same?Below are the specifications of my application,
I am using following command to build my application ( Normal ng build --prod is throwing Javascript heap related error )
node --max_old_space_size=5048 ./node_modules/@angular/cli/bin/ng build --prod
Application is huge and it has following module, component counts,

π¬ Minimal Reproduction
π₯ Exception or Error
π Your Environment
Angular CLI: 6.2.8
Node: 8.11.2
OS: darwin x64
Angular: 6.1.10
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.6.8
@angular-devkit/build-angular 0.6.8
@angular-devkit/build-optimizer 0.6.8
@angular-devkit/core 0.6.8
@angular-devkit/schematics 0.8.8
@angular/cdk 6.4.7
@angular/cli 6.2.8
@angular/flex-layout 6.0.0-beta.18
@angular/material 6.4.7
@ngtools/webpack 6.0.8
@schematics/angular 0.8.8
@schematics/update 0.8.8
rxjs 6.3.3
typescript 2.7.2
webpack 4.8.3
Anything else relevant?
Same thing here.
App is quite big and produces close to 200 chunks with:
node --max_old_space_size=12288 node_modules/@angular/cli/bin/ng build --prod --build-optimizer
Node: 10.15.3
OS: linux x64
Angular:
Package Version
------------------------------------------------------
@angular-devkit/architect 0.10.6
@angular-devkit/core 7.0.6
@angular-devkit/schematics 7.0.6
@angular/cli 7.0.6
@schematics/angular 7.0.6
@schematics/update 0.10.6
rxjs 6.3.3
typescript 3.1.6```
Takes around 700s on an i7 3630qm with 16gB RAM.
Only 1 or 2 out of 8 available threads are consuming 100% CPU rest are mostly sub 10% usage.
Numerous improvements regarding memory usage and overall performance have been made since the 6.x and 7.x versions were released. Please consider upgrading to the latest stable version of the Angular CLI (currently 8.3.22). Upgrading Node.js to version 12 should provide performance benefits as well.
If problems persist after upgrading, please open a new issue detailing the issue.
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.