Do you want to request a feature or report a bug?
I want to report a performance bug.
What is the current behavior?
In projects with a lot of chunks, a lot of time is spent on
The original report (angular/angular-cli#5618 (comment)) detailed a 1h build time for a non-production (no uglify etc) build.
The project uses Angular CLI and contains around ~2700 source files. This project has 376 chunks.
A similar sized project (https://github.com/filipesilva/angular-cli-test-repo) takes only a few minutes to build using the same options.
If the current behavior is a bug, please provide the steps to reproduce.
The project is closed source so I do not have a source, but the owner is available for some remote debugging (angular/angular-cli#5618 (comment)).
Both profiles show the majority of time being spent in
RemoveParentModulesPlugin, specifically within the
hasModule function. Also see the “Other information” bit at the end for a comparison with Webpack 4.
What is the expected behavior?
RemoveParentModulesPlugin is optimized to allow having a lot of chunks without a big performance hit.
Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
Node.js 8.4.0, Webpack 3.10.0. Unknown browser/OS.
I’ve been looking at Webpack 4 and thought maybe it could help since there are a lot of performance improvements there. The plugin in question has suffered some changes:
It looks like there’s a fair bit of optimizations changes there. But I’m not sure if the bottleneck has changed.
There’s two places where time is being spent on the CPU profile:
This function hasn’t changed though so I don’t think it would speed up in this case.