Incremental rebuild performance regression in v5.54.0
See original GitHub issueBug report
What is the current behavior?
Webpack spends several seconds inside of lib/Watching.js
after an incremental rebuild:
This profile is from 5.54.0
:
And I verified it’s still an issue in 5.67.0
(as well as a few versions in between):
If the current behavior is a bug, please provide the steps to reproduce. I’m not sure how to reproduce this outside of our app, I think it’s only really noticeable by it being a large application. I’ve included the profiles from the debugger, so I hope that’s enough to go on? If not let me know if there’s anything else I can do to help diagnose the root cause.
What is the expected behavior?
Webpack should spend only about a second on this step. This profile is from 5.53.0
(but also seeing the same lower speeds on 5.50.0
and 5.52.1
so I’m confident it’s not a fluke)
Other relevant information:
webpack version: All versions of webpack from 5.54.0
Node.js version: v16.13.1
Operating System: MacOS Monterey
Additional tools: This is being run from the angular cli
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (8 by maintainers)
Top GitHub Comments
https://github.com/webpack/webpack/pull/15991 may address this partially. I don’t know if it’ll bring the 7.65s
Watching.js
call back down to 1.02s, but it should be much less.I’ll do what I can to debug locally and see if I can work out what’s wrong.
Yep exactly the same each time, all I did between each of those profiles was run
npm i -D webpack@version
and then run an incremental rebuild. I’m not sure how to reproduce it standalone in a repo as our app is enormous, and I suspect the problem is caused by it being a large app, rather than a specific issue within it.