Sealing hashing takes forever when hot: true
See original GitHub issueBug report
Performance for hot: true seems to be pretty bad, taking a 12s compile to a 110s compile. And it seems to be completely dependent on a slowing hashing function from webpack-sources
. It only appears when you have lots of small files, like 3k+. Here’s the last status update by the progress flag:
[webpack.Progress] 65% building 4/4 entries 26696/26696 dependencies 6288/6288 modules
It seems to be thrashing memory-wise, as you can see by the second image it’s spending 37s in GC.
What is the current behavior?
It seems when there is a lot of files, webpack exponentially slowes down.
Since this project is scala.js I can generate javascript files two different ways
- With lots of small files
- With fewest files.
So for the first one, here is a chart: And the bottoms up view (Heavy methods)
And for the second one here is another chart, which looks normal.
Practically this is the same code just organized differently.
If the current behavior is a bug, please provide the steps to reproduce.
I’ll try to find a way to give some code where it’s reproducible, but I have something like 3195 files just in my project not including dependencies in the first option. And 30 files with the second one.
What is the expected behavior?
Have linear performance with regard to the number of files processed by webpack.
Other relevant information: webpack version: 5.45.1 Node.js version: v14.17.0 Operating System: Linux Additional tools:
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
And, just confirmed it is totally fixed, wow, thank you @sokra!
Thanks that was very useful. I’ll see tomorrow if that can be fixed.