Skip to content

ng serve Incremental Build Times Increased Massively When Upgrading From Angular v12 -> v15 #24634

Closed
@fearghalom

Description

@fearghalom

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

12.2.17

Description

I recently tried to upgrade our large enterprise application (~1300 components) from Angular v12 to v15. After the upgrade, I noticed that 'ng serve' incremental build times had increased from around (15s - 25s) on Angular v12 to (115s - 130s) on Angular v15. This kind of degradation in build performance was not expected. Here are my settings in the angular.json file for our 'development' config.

"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true,
"aot": false,
"progress": true
}

I tried a number of thing to see if I could bring down the time. One that gave a limited improvement was to move the entries from the "scripts" section in the angular.json file and directly reference them in the index.html file via script tags instead. This reduced the incremental build times to (95s - 100s)

Minimal Reproduction

I wasn't able to reproduce issue in a smaller application and I can't share our code base.

Exception or Error

No response

Your Environment

_                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 15.0.4
Node: 14.21.2
Package Manager: npm 6.14.17
OS: win32 x64

Angular: 15.0.4
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1500.4
@angular-devkit/build-angular   15.0.4
@angular-devkit/core            15.0.4
@angular-devkit/schematics      15.0.4
@angular/cdk                    15.0.3
@angular/flex-layout            14.0.0-beta.41
@angular/material               15.0.3
@schematics/angular             15.0.4
rxjs                            6.6.0
typescript                      4.8.4

Anything else relevant?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions