Skip to content

rebuild time depends on assets  #20244

Description

@montella1507

Versions:

"@angular/animations": "^11.0.4",
   "@angular/cdk": "^11.0.2",
   "@angular/common": "^11.0.4",
   "@angular/compiler": "^11.0.4",
   "@angular/core": "^11.0.4",
   "@angular/forms": "^11.0.4",
   "@angular/localize": "^11.0.4",
   "@angular/platform-browser": "^11.0.4",
   "@angular/platform-browser-dynamic": "^11.0.4",
   "@angular/router": "^11.0.4"
  "@angular-devkit/build-angular": "^0.1100.4",
   "@angular-eslint/eslint-plugin": "0.8.0-beta.5",
   "@angular-eslint/eslint-plugin-template": "0.8.0-beta.5",
   "@angular-eslint/template-parser": "0.8.0-beta.5",
   "@angular/cli": "^11.0.4",
   "@angular/compiler-cli": "^11.0.4",
   "@angular/language-service": "^11.0.4",

Rebuild time is somehow affected by assets in angular.json - here are table with times with and without assets:

   "assets": [
              "apps/edhance/src/favicon.ico",
              "apps/edhance/src/assets",
              "apps/edhance/src/config.json",
              {
                "glob": "**/*",
                "input": "apps/edhance/configs",
                "output": "./configs/"
              }
            ],

image

Difference in first build is comprehensible (to copy static - immutable assets to serve folder), however, why is so big difference in rebuild time when i change typescript file?

image

(another project)
image

Activity

  1. alan-agius4 commented on Mar 11, 2021

    @alan-agius4
    Collaborator

    This is unfortunately how https://webpack.js.org/plugins/copy-webpack-plugin works with Webpack 4. With every re-build the assets patterns are re-processed and copied over and over again.

    With Webpack 5 & caching enabled this should get better eventually as this plugin use caching to reduce IO calls https://github.com/webpack-contrib/copy-webpack-plugin/blob/01fa91b09d3b4fdc4552b520bb90918fc7f34e54/src/index.js#L604

  2. modified the milestone: Backlog on Mar 11, 2021
  3. montella1507 commented on Mar 11, 2021

    @montella1507
    Author

    :-( So it may be possible to try performance boost with:

    "resolutions": {
        "webpack": "^5.0.0"
    }
    

    right?

  4. alan-agius4 commented on Mar 11, 2021

    @alan-agius4
    Collaborator

    yes

  5. changed the title [-]Rebuild time depends on assets [/-] [+]rebuild time depends on assets [/+] on Apr 8, 2021
  6. linked a pull request that will close this issueUpgrade tooling to use Webpack 5 #20466on Apr 8, 2021
  7. angular-automatic-lock-bot commented on May 9, 2021

    @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.

  8. locked and limited conversation to collaborators on May 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions