Skip to content

Super slow build time while updating to v8.0.0 #14666

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

Closed
hugo-marello opened this issue Jun 4, 2019 · 7 comments
Closed

Super slow build time while updating to v8.0.0 #14666

hugo-marello opened this issue Jun 4, 2019 · 7 comments

Comments

@hugo-marello
Copy link

hugo-marello commented Jun 4, 2019

🐞 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?

Previous versions were way faster, last compiled with 7.2.0

Description

Tryed to update my large angular application to version 8.0.0, but the build takes forever.

🔬 Minimal Reproduction

Create a v6 angular app and follow the instructions on https://update.angular.io to update it to v8.0.0 . Build the application with node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build --prod --verbose --no-progress > log.txt

🌍 Your Environment




Angular CLI: 8.0.1
Node: 10.15.2
OS: linux x64
Angular: 8.0.0
... animations, cdk, common, compiler, compiler-cli, core, forms
... language-service, material, material-moment-adapter
... platform-browser, platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.800.1
@angular-devkit/build-angular     0.800.1
@angular-devkit/build-optimizer   0.800.1
@angular-devkit/build-webpack     0.800.1
@angular-devkit/core              8.0.1
@angular-devkit/schematics        8.0.1
@angular/cli                      8.0.1
@ngtools/webpack                  8.0.1
@schematics/angular               8.0.1
@schematics/update                0.800.1
rxjs                              6.5.2
typescript                        3.4.5
webpack                           4.30.0

Anything else relevant?
My guess is the angular-devkit/build-angular is the culprit, it was known to have caused slowness in the past. I've run the benchmark inside the webpack script, I've posted the first half hour of execution.
log.zip

@alialtun14
Copy link

alialtun14 commented Jun 4, 2019

Hi @hugo-marello. I have the same problem. But the interesting thing is that only two people (according to stockover veya github issue ) have met this problem so far.

#14604

@jocstech
Copy link

jocstech commented Jun 4, 2019

I have the same slow-compiling issues here when using angular 8

@alan-agius4
Copy link
Collaborator

Hi @hugo-marello,

Thanks for the information provided. However, let's keep this in a single thread being #13734

Thanks

@micobarac
Copy link

micobarac commented Jun 18, 2019

@alan-agius4, what does this problem have to do with single thread you mentioned? I have the same slow build times with Angular 8, too. Building for production seems like to be doing the job in two steps, first by creating javascript chunks and the second by doing SASS compilation.

@julianpoemp
Copy link

@alan-agius4 can you please reopen this issue? There are a lot of people having this problem.

I tried to find a solution, but nothing helps to get the fast building like in Angular 6. With Angular 6 the build --prod time was like 10 seconds and now its 64 seconds. That with this optimizations:

node --max-old-space-size=8000 ./node_modules/@angular/cli/bin/ng build --prod --aot=false --optimization=true --sourceMap=false --buildOptimizer=false

What can we do to get better build times?

@mcenkar
Copy link

mcenkar commented Jul 1, 2019

What can we do to get better build times?

For me installing node-sass helped a lot

yarn add node-sass

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants