Do you want to request a feature or report a bug?
Probably it’s bug…
What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce.
I build a simple example with one ‘import’ = angular library.
After update to 2.3.1 version I noticed that build is too long.
What is the expected behavior?
The same project with 2.2.1 webpack.
If this is a feature request, what is motivation or use case for changing the behavior?
Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
Could be this line^^
Sounds like a similar issue to babel/babel#3565 where because you read from
this.generatedCode
, V8 will flatten the string into contiguous memory on access. When concatenating a very large string, reading the string content should be avoided until you are done appending.I am also experiencing this issue on 2.3.3.
Running:
time NODE_ENV=production webpack -p --config ./config/webpack.config.prod.js
Output:
Here is my production webpack config file:
I am also experiencing this issue on 2.5.1
This seem to be a different issue. When facing incorrect long build times try this:
Make sure to use the lastest LTS node.js version.
Make sure to use the lastest webpack version.
In chrome open chrome://inspect
Open the devtools for node.js
Go to the profiler and start a CPU profile (it automatically continues execution):
Watch the commandline and press
Stop
when the build has finished.Take a look at the flame graph. Take a screenshot. Identify slow parts.
Save the profile into a file.
File a new issue with your findings.
after about 10 minutes I end up with
Adding a swap drive will fix the above, for anyone landing here in the future, though has little to do with original issue:
https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04