Skip to content

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

Closed
@x87

Description

@x87

🐞 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: compilerIssues related to `ngc`, Angular's template compilerarea: performanceIssues related to performance

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions