question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Regression in compiler-cli 10.1.0+: build is 10x times slower

See original GitHub issue

🐞 bug report

Affected Package

The issue is caused by package @angular/compiler-cli@10.1.0

Is this a regression?

Yes, the previous version in which this bug was not present was: @angular/compiler-cli@10.0.14

Description

During an attempt to upgrade our repo to Angular 10.1 we noticed that one of our applications is not building anymore. We have investigated and found that one particular component is now taking too much time to compile (10 minutes and more).

It started on @angular/compiler-cli 10.1.0 With this version an app with only one component takes ~3 minutes to compile. With @angular/compiler-cli 10.0.14 the build takes ~20 seconds to complete.

The issue is reproducible with fullTemplateTypeCheck: true and strictNullChecks: true.

πŸ”¬ Minimal Reproduction

https://github.com/x87/ng10bug

Run yarn build and observe build time. Then change strictNullChecks to true in tsconfig.json and re-run yarn build.

🌍 Your Environment

Angular Version:


Angular CLI: 10.1.6
Node: 12.18.2
OS: darwin x64

Angular: 10.1.5
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.1001.6
@angular-devkit/build-angular      0.1001.6
@angular-devkit/build-ng-packagr   0.1001.6
@angular-devkit/core               10.1.6
@angular-devkit/schematics         10.1.6
@angular/cli                       10.1.6
@schematics/angular                10.1.6
@schematics/update                 0.1001.6
rxjs                               6.5.5
typescript                         4.0.3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

5reactions
JoostKcommented, Oct 15, 2020

I reported this in microsoft/TypeScript#41124.

2reactions
JoostKcommented, Dec 11, 2020

Hello folks,

TypeScript 4.1.3 was just released which contains a fix for the cache miss issue when computing type information from the control flow graph. Support for TypeScript 4.1 has been added in Angular 11.1, which is slated to be released in January. Preview builds of 11.1 are available on NPM using the next tag, so it is possible to experiment with TS 4.1 today.

I’ll close this issue as we won’t be making changes to Angular to workaround the TS bug (as that would in fact be a performance regression for cases where this bug isn’t hit).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Incremental AOT compilation is 5 times slower in Angular 11.1 ...
After upgrading the app to 11.1 I observed regression in build time - both initial and incremental. While intial build time increased by...
Read more >
Angular: Running ngcc causing performance issues in VSCode
Since this text is showing in the status my vscode has some performance issues... it became very-very slow. Sometimes, very often the quickΒ ......
Read more >
Using LC's Sierra Systems | HPC @ LLNL
The topic of running jobs is covered in detail in several sections, including obtaining system status and configuration information, creating and submittingΒ ...
Read more >
@angular-devkit/schematics: Versions | Openbase
We now issue a build time error since importing a CSS file as an ECMA module is non standard Webpack specific feature, which...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found