Skip to content

Slowdown in esbuild build time in 20.3.1 and newer #64403

Closed

Description

@v-jaros

Command

serve

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

20.3.0

Description

ng serve suddenly takes almost twice as long to build, no change in config or code, just dependencies update - see package.json examples

package.json that takes 35s to build
"dependencies": {
"@angular/animations": "20.3.0",
"@angular/cdk": "20.2.2",
"@angular/common": "20.3.0",
"@angular/compiler": "20.3.0",
"@angular/core": "20.3.0",
"@angular/forms": "20.3.0",
"@angular/platform-browser": "20.3.0",
"@angular/platform-browser-dynamic": "20.3.0",
"@angular/platform-server": "20.3.0",
"@angular/router": "20.3.0",
...
},
"devDependencies": {
"@angular/build": "20.3.0",
"@angular/cli": "20.3.0",
"@angular/compiler-cli": "20.3.0",
"@angular/language-service": "20.3.0",
...
}

package.json that takes 60s to build
"dependencies": {
"@angular/animations": "20.3.1",
"@angular/cdk": "20.2.2",
"@angular/common": "20.3.1",
"@angular/compiler": "20.3.1",
"@angular/core": "20.3.1",
"@angular/forms": "20.3.1",
"@angular/platform-browser": "20.3.1",
"@angular/platform-browser-dynamic": "20.3.1",
"@angular/platform-server": "20.3.1",
"@angular/router": "20.3.1",
...
},
"devDependencies": {
"@angular/build": "20.3.1",
"@angular/cli": "20.3.1",
"@angular/compiler-cli": "20.3.1",
"@angular/language-service": "20.3.1",
...
}

Minimal Reproduction

ng serve

Exception or Error


Your Environment

=== SLOW BUILDS ENV ===
Angular CLI: 20.3.1
Node: 22.15.1
Package Manager: npm 10.9.2
OS: win32 x64


Angular: 20.3.1
... animations, build, cli, common, compiler, compiler-cli, core
... forms, language-service, platform-browser
... platform-browser-dynamic, platform-server, router

Package                      Version
------------------------------------
@angular-devkit/architect    0.2003.1
@angular-devkit/core         20.3.5
@angular-devkit/schematics   20.3.5
@angular/cdk                 20.2.2
@schematics/angular          20.3.1
rxjs                         7.8.2
typescript                   5.8.3
zone.js                      0.15.1

=== FAST BUILDS ENV ===
Angular CLI: 20.3.0
Node: 22.15.1
Package Manager: npm 10.9.2
OS: win32 x64


Angular: 20.3.0
... animations, build, cli, common, compiler, compiler-cli, core
... forms, language-service, platform-browser
... platform-browser-dynamic, platform-server, router

Package                      Version
------------------------------------
@angular-devkit/architect    0.2003.0
@angular-devkit/core         20.3.5
@angular-devkit/schematics   20.3.5
@angular/cdk                 20.2.2
@schematics/angular          20.3.0
rxjs                         7.8.2
typescript                   5.8.3
zone.js                      0.15.1

Anything else relevant?

No response

Activity

  1. clydin commented on Oct 13, 2025

    @clydin
    Member

    Can you selectively downgrade specific packages to attempt to assist in determining the root cause?
    The most relevant packages would be @angular/build, @angular/compiler, and @angular/compiler-cli.

    The @angular/build package only had 2 commits from 20.3.0 to 20.3.1. One of which was a logging change and the other an update of vite. (Details: angular/angular-cli@20.3.0...20.3.1)

  2. v-jaros commented on Oct 14, 2025

    @v-jaros
    Author

    It seems to be caused by @angular/compiler-cli - having all packages in version 20.3.1 - changed just compiler-cli to 20.3.0 and build is fast as before.

  3. added
    area: performance
    regression
    area: compiler
    on Oct 14, 2025
  4. modified the milestone: needsTriage on Oct 14, 2025
  5. JoostK commented on Oct 14, 2025

    @JoostK
    Member

    I expect this to be due to #63754, which is almost a straight revert of the change made in #57291 which reintroduces the performance footgun. The proper fix would be #57337

  6. JeanMeche commented on Oct 14, 2025

    @JeanMeche
    Member

    To confirm Joost's suspicion, you can disable the diagnostic in tsconfig.json with:

    {
      "angularCompilerOptions": {
        "extendedDiagnostics": {
          "checks": {
            "interpolatedSignalNotInvoked": "suppress"
          }
        }
      }
    }
    
  7. v-jaros commented on Oct 14, 2025

    @v-jaros
    Author

    I've tested it and can confirm that "interpolatedSignalNotInvoked": "suppress" restores the original build speed.

  8. added a commit that references this issue on Oct 14, 2025
    145b19c
  9. added a commit that references this issue on Oct 14, 2025
    c2e817b
  10. added a commit that references this issue on Oct 14, 2025
    49377d2
  11. JoostK commented on Oct 15, 2025

    @JoostK
    Member

    20.3.5 was just released where the performance should have improved.

  12. angular-automatic-lock-bot commented on Nov 15, 2025

    @angular-automatic-lock-bot

    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.

  13. locked and limited conversation to collaborators on Nov 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: compilerarea: performanceregression

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions