Skip to content

In Angular 8, rebuild time increased 5 times #14746

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
kondi opened this issue Jun 12, 2019 · 6 comments
Closed

In Angular 8, rebuild time increased 5 times #14746

kondi opened this issue Jun 12, 2019 · 6 comments

Comments

@kondi
Copy link

kondi commented Jun 12, 2019

🐞 Bug report

Command (mark with an x)

- [ ] new
- [ ] build
- [X] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

Yes. Fast edit-refresh cycle is important for efficient development and good developer experience. These numbers are on an i7 8700k, 4.70 GHz, 6 cores. On an i5 laptop, this is much worse.

Description

I am launching ng serve, wait for the first build, then simply add a character to a component html and wait for its rebuild.

Angular 7 with node 10 numbers:

Initial build time: 20277ms

Date: 2019-06-12T08:45:40.442Z - Hash: 798d6268d0081779e433 - Time: 3906ms
Date: 2019-06-12T08:45:44.915Z - Hash: f2261bf0f4c989aafd45 - Time: 713ms
Date: 2019-06-12T08:45:49.619Z - Hash: b1d9acd1ba005e02d16a - Time: 686ms
Date: 2019-06-12T08:45:53.047Z - Hash: a61cd4f8957f38c022b4 - Time: 626ms
Date: 2019-06-12T08:45:56.484Z - Hash: b7a19671b191125819c2 - Time: 636ms
Date: 2019-06-12T08:45:59.639Z - Hash: 7c9c0bce292d15ef2cd3 - Time: 569ms

Except for the first rebuild, the avg is 646 ms.

Then I upgrade to angular 8 by following https://update.angular.io/#7.0:8.0

Angular 8 with node 12 numbers:

Initial build time: 19749ms

Date: 2019-06-12T09:28:45.682Z - Hash: 75800fbf7877bb95d0d2 - Time: 6748ms
Date: 2019-06-12T09:28:52.409Z - Hash: 23e65c2b0fce1a3361a1 - Time: 4369ms
Date: 2019-06-12T09:28:58.482Z - Hash: 84b7dd3bad28fba0fdf2 - Time: 3301ms
Date: 2019-06-12T09:29:03.940Z - Hash: 0c71ad6034ff26149d83 - Time: 3148ms
Date: 2019-06-12T09:29:09.120Z - Hash: 99eec27b6f1cbaf2cfc9 - Time: 3052ms
Date: 2019-06-12T09:29:14.325Z - Hash: 286940db558cc2daef0c - Time: 3067ms

Except for the first rebuild, the avg is 3387 ms.

If I skip the node upgrade, angular 8 with node 10 numbers:

Initial build time: 22310ms

Date: 2019-06-12T09:47:13.472Z - Hash: ea5ee2c476dbd8c936b7 - Time: 4383ms
Date: 2019-06-12T09:47:19.800Z - Hash: b4743902c21eb978d7ce - Time: 3028ms
Date: 2019-06-12T09:47:25.326Z - Hash: 99614fb778701ac8b76d - Time: 2766ms
Date: 2019-06-12T09:47:32.048Z - Hash: 71ce551c8d9a33219f5e - Time: 2935ms
Date: 2019-06-12T09:47:38.543Z - Hash: 57c68cb3f0fd65b07920 - Time: 2635ms
Date: 2019-06-12T09:47:44.753Z - Hash: df1234ad69d85c40ebc2 - Time: 2971ms

Except for the first rebuild, the avg is 2867 ms.

🌍 Your Environment


Angular CLI: 8.0.2
Node: 12.4.0
OS: win32 x64
Angular: 8.0.0
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router

Package                                    Version
--------------------------------------------------------------------
@angular-devkit/architect                  0.800.2
@angular-devkit/build-angular              0.800.2
@angular-devkit/build-optimizer            0.800.2
@angular-devkit/build-webpack              0.800.2
@angular-devkit/core                       8.0.2
@angular-devkit/schematics                 8.0.2
@angular/cdk                               8.0.1
@angular/cli                               8.0.2
@angular/material                          8.0.1
@ngtools/webpack                           8.0.2
@nguniversal/express-engine                7.1.1
@nguniversal/module-map-ngfactory-loader   7.1.1
@schematics/angular                        8.0.2
@schematics/update                         0.800.2
rxjs                                       6.4.0
typescript                                 3.4.5
webpack                                    4.30.0

Anything else relevant?

Sass: yes, fibers is installed
Operating system: windows 10

@kondi
Copy link
Author

kondi commented Jun 12, 2019

Might be related to #14604 or #13734, but the initial build times are not worse, this is mainly about a rebuild time regression of a non-production build by ng serve.

@clydin
Copy link
Member

clydin commented Jun 12, 2019

Fixed on master and will be in the next patch release.

Dupe of #14719

@clydin clydin closed this as completed Jun 12, 2019
@micobarac
Copy link

I have the same problem with Angular 8. I hope the fixed version will be out soon.

@kondi
Copy link
Author

kondi commented Jun 18, 2019

@micobarac Fix is already in @angular/cli v8.0.3, however it has #14775. Probably its fix will be released as well this week in v8.0.4.

@adripanico
Copy link

Let's wait to cli 8.0.4 then, I notice some improvement, but not enough: #14604 (comment)

@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

4 participants