Skip to content
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

Rebuild time is not stable anymore in 8.0.3 #14775

Closed
kondi opened this issue Jun 14, 2019 · 1 comment · Fixed by #14778
Closed

Rebuild time is not stable anymore in 8.0.3 #14775

kondi opened this issue Jun 14, 2019 · 1 comment · Fixed by #14778

Comments

@kondi
Copy link

kondi commented Jun 14, 2019

🐞 Bug report

Using @ngtools/webpack 8.0.3, every second rebuild time is high.

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, since 8.0.1. First appeared in 8.0.2 (see #14719), 8.0.3 aimed to fix it, but the fix is half-measure (literally).

Description

Launch ng serve, wait for the first build, then touch a component html file and wait its rebuild. I did this few times and wrote down the rebuild times.

Version 8.0.3:

Date: 2019-06-14T08:56:30.744Z - Hash: 1510132cb3f52964d65f - Time: 604ms
Date: 2019-06-14T08:56:38.832Z - Hash: ed253eed9ef804f511c4 - Time: 3532ms
Date: 2019-06-14T08:56:41.848Z - Hash: e6c08a5104db15d947e1 - Time: 515ms
Date: 2019-06-14T08:56:46.328Z - Hash: 09d3d86fec4c9a9a8834 - Time: 2672ms
Date: 2019-06-14T08:56:48.946Z - Hash: 097aa1913892c8c0686b - Time: 508ms
Date: 2019-06-14T08:56:54.344Z - Hash: 202a52c4a542a92a1b29 - Time: 2602ms
Date: 2019-06-14T08:56:57.124Z - Hash: 7f1ee6300d02717134b9 - Time: 483ms
Date: 2019-06-14T08:57:02.795Z - Hash: 0a543e91e63df3ef126b - Time: 2539ms

First rebuild is fast, but every second rebuild is slow.

Version: 8.0.2:

Date: 2019-06-14T09:07:16.760Z - Hash: 6097b75a6d66059ebe08 - Time: 3601ms
Date: 2019-06-14T09:07:21.965Z - Hash: 6da18789c4ba1a17e497 - Time: 3108ms
Date: 2019-06-14T09:07:26.492Z - Hash: d2ff2f0ddee4629d1873 - Time: 2975ms
Date: 2019-06-14T09:07:30.964Z - Hash: bfdb111a980b70d79663 - Time: 2650ms
Date: 2019-06-14T09:07:35.738Z - Hash: d561e16b9dbb24e847d9 - Time: 3048ms
Date: 2019-06-14T09:07:40.500Z - Hash: 5687d30b86313eef337f - Time: 2671ms
Date: 2019-06-14T09:07:45.331Z - Hash: 8a729cf663bdc716675f - Time: 2980ms
Date: 2019-06-14T09:07:50.294Z - Hash: 448f796097c1c2eca4a6 - Time: 2760ms

Every rebuild is slow.

Version: 8.0.1:

Date: 2019-06-14T09:10:33.650Z - Hash: 6097b75a6d66059ebe08 - Time: 606ms
Date: 2019-06-14T09:10:36.262Z - Hash: 6da18789c4ba1a17e497 - Time: 545ms
Date: 2019-06-14T09:10:38.651Z - Hash: d2ff2f0ddee4629d1873 - Time: 519ms
Date: 2019-06-14T09:10:40.835Z - Hash: bfdb111a980b70d79663 - Time: 514ms
Date: 2019-06-14T09:10:42.731Z - Hash: d561e16b9dbb24e847d9 - Time: 524ms
Date: 2019-06-14T09:10:44.932Z - Hash: 5687d30b86313eef337f - Time: 489ms
Date: 2019-06-14T09:10:47.433Z - Hash: 8a729cf663bdc716675f - Time: 642ms
Date: 2019-06-14T09:10:49.930Z - Hash: 448f796097c1c2eca4a6 - Time: 504ms

Every rebuild is fast.

🌍 Your Environment


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

Anything else relevant?

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

@ngbot ngbot bot added this to the needsTriage milestone Jun 14, 2019
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Jun 14, 2019
mgechev pushed a commit that referenced this issue Jun 14, 2019
… an emit

There can be a number of reason why `_emitSkipped` is set to true these are:
- Errors have been encountered
- Changes are outside of TS compilations such as HTML and CSS in JIT mode

We only want to run a full JIT emit when;
- There hasn't been a success emit
- When a large number of files have changed
- First run

If a subsequent JIT build fails we shouldn't do a full emit either as we will transpile only the files that changes after the success build

https://github.com/angular/angular-cli/blob/64243919c10c33775be71010efd5ae69622a728f/packages/ngtools/webpack/src/angular_compiler_plugin.ts#L1029-L1031

Fixes #14775
mgechev pushed a commit that referenced this issue Jun 14, 2019
… an emit

There can be a number of reason why `_emitSkipped` is set to true these are:
- Errors have been encountered
- Changes are outside of TS compilations such as HTML and CSS in JIT mode

We only want to run a full JIT emit when;
- There hasn't been a success emit
- When a large number of files have changed
- First run

If a subsequent JIT build fails we shouldn't do a full emit either as we will transpile only the files that changes after the success build

https://github.com/angular/angular-cli/blob/64243919c10c33775be71010efd5ae69622a728f/packages/ngtools/webpack/src/angular_compiler_plugin.ts#L1029-L1031

Fixes #14775
@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
ikjelle pushed a commit to ikjelle/angular-cli that referenced this issue Mar 26, 2024
… an emit

There can be a number of reason why `_emitSkipped` is set to true these are:
- Errors have been encountered
- Changes are outside of TS compilations such as HTML and CSS in JIT mode

We only want to run a full JIT emit when;
- There hasn't been a success emit
- When a large number of files have changed
- First run

If a subsequent JIT build fails we shouldn't do a full emit either as we will transpile only the files that changes after the success build

https://github.com/angular/angular-cli/blob/64243919c10c33775be71010efd5ae69622a728f/packages/ngtools/webpack/src/angular_compiler_plugin.ts#L1029-L1031

Fixes angular#14775
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants