Webpack 5 production build takes ~20% more time than in webpack 4
See original GitHub issueBug report
What is the current behavior?
Production build in webpack 5 takes approximatly 20% more time to complete than in webpack 4. Turn minimization off via optimization.minimize makes webpack 5 actually faster then webpack 4.
Providing result of 10 build runs by webpack 4 and by webpack 5:
webpack 4: 6.135080679988861 seconds
webpack 5: 7.854557122190793 seconds
If the current behavior is a bug, please provide the steps to reproduce. Repo for reproducing https://github.com/SkReD/webpack5-performance-issue
What is the expected behavior? Build time is bigger about 0 - 5% maximum. Should be possible to configure optimization for reducing build time to webpack 4 values.
Other relevant information: webpack version: 5.38.1 Node.js version: 16.3.0 (–cpu-profile fails on current LTS) Operating System: windows 10 x64 Additional tools:
Providing logs of last runs from bench run
webpack 4 profile logs main-process.cpuprofile
webpack 5 profile logs main-process.cpuprofile
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (9 by maintainers)
Top GitHub Comments
@SkReD I will look at repos in near future
Disabling
parallel
didn’t help