Skip to content

Angular 13 build time increased #23183

@filipkranjec

Description

@filipkranjec

🐞 Bug report

Command (mark with an x)

  • new
  • [ x] build
  • [ x] serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Yes, i think.

Description

Problem happens when I try to build or even serve my application. A week ago build time was around 20 seconds and now it is around 5 minutes but application has no additional dependencies.

🔬 Minimal Reproduction

Minimal reproduction would be creating new Angular 13 project that has library and application ( envelope ). Add dependency to the new library and then library builds normally but application takes up to 5 minutes to serve or build.

🔥 Exception or Error

ng serve --verbose output




LOG from webpack.Compilation
 runtime requirements.modules: 0.181344 ms
 runtime requirements.chunks: 0.107013 ms
 runtime requirements.entries: 0.973574 ms
 compute affected modules: 0.002675 ms
 finish modules: 14.121079 ms
 report dependency errors and warnings: 4.755542 ms
 optimize dependencies: 3.734356 ms
 create chunks: 3.779532 ms
 compute affected modules with chunk graph: 0.005 ms
 optimize: 13.969291 ms
    121 modules hashed, 0 from cache (0.49 variants per module in average)
 module hashing: 6.076725 ms
    100% code generated (121 generated, 0 from cache)
 code generation: 45.048986 ms
 runtime requirements.modules: 0.837738 ms
 runtime requirements.chunks: 0.315298 ms
 runtime requirements.entries: 0.970279 ms
 runtime requirements: 2.250775 ms
 hashing: initialize hash: 0.007284 ms
 hashing: sort chunks: 0.047089 ms
 hashing: hash runtime modules: 1.25607 ms
 hashing: hash chunks: 3.121244 ms
 hashing: hash digest: 0.285712 ms
 hashing: process full hash modules: 0.294808 ms
 hashing: 5.239809 ms
    100% code generated (7 generated, 0 from cache)
 record hash: 0.097444 ms
 module assets: 0.19519 ms
 create chunk assets: 6.086784 ms
 process assets: 466.081301 ms

LOG from webpack.Compiler
 make hook: 332286.527455 ms
 finish make hook: 0.106071 ms
 finish compilation: 18.924441 ms
 seal compilation: 554.592836 ms
 afterCompile hook: 0.175022 ms
 emitAssets: 52.176112 ms
 emitRecords: 0.056898 ms

LOG from webpack.ResolverCachePlugin
    22% really resolved (392 real resolves with 0 cached but invalid, 1414 cached valid, 0 concurrent)

LOG from webpack.FlagDependencyExportsPlugin
 restore cached provided exports: 1.247033 ms
 figure out provided exports: 7.890552 ms
    94% of exports of modules have been determined (15 no declared exports, 232 not cached, 0 flagged uncacheable, 0 from cache, 0 from mem cache, 3 additional calculations due to dependencies)
 store provided exports into cache: 1.394052 ms

LOG from webpack.SideEffectsFlagPlugin
 update dependencies: 3.367661 ms

LOG from webpack.buildChunkGraph
 visitModules: prepare: 1.560606 ms
 visitModules: visiting: 2.452718 ms
    347 queue items processed (161 blocks)
    0 chunk groups connected
    0 chunk groups processed for merging (0 module sets, 0 forked, 0 + 0 modules forked, 0 + 0 modules merged into fork, 0 resulting modules)
    0 chunk group info updated (0 already connected chunk groups reconnected)
 visitModules: 2.611649 ms
 connectChunkGroups: 0.006151 ms
 cleanup: 0.001984 ms

LOG from webpack.SplitChunksPlugin
 prepare: 0.043142 ms
 modules: 3.29825 ms
 queue: 0.346386 ms
 maxSize: 0.014377 ms

Build time: 335281ms

🌍 Your Environment




Angular CLI: 13.3.6
Node: 16.15.0
Package Manager: npm 
OS: linux x64

Angular: 13.3.9
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1303.6
@angular-devkit/build-angular   13.3.6
@angular-devkit/core            13.3.6
@angular-devkit/schematics      13.3.6
@angular/cli                    13.3.6
@schematics/angular             13.3.6
ng-packagr                      13.3.1
rxjs                            6.6.7
typescript                      4.6.4

Anything else relevant?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions