Bundeling takes long time to deploy
See original GitHub issueThis issue is a:
- Bug / Performance improvement
Environment
| Question | Answer |
|---|---|
| Magento version | 2.2.6 |
node.js version (node -v) |
v6.11.1 |
npm version (npm -v) |
3.10.10 |
Description
This shop has 4 themes (which inherent from the same theme) and 2 languages. We see a huge increase in deployment time when the Javascript bundeling is enabled.
Normal deployment, without the Javascript bundeling enabled takes about 10 minutes. With Javascript bundeling enabled it takes more then 40 minutes. So bundeling and running uglify over the files increases the deployment time substantially with 30 minutes.
Expected result:
I expect to see a light increate in deployment time, because you are adding more steps to the deployment. But an increate 3 times is a bit much.
Possible solutions:
I see the uglify is stuck on the Javascript of the Magento_Swagger module for quite some time.
Log files
Log files of deployment. Bundeling occurs in the step “magento:bundle” at 05:20 ends at 35:07. So takes close to 30 minutes.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)

Top Related StackOverflow Question
After this issue was opened, I spent some time digging for tools that used the latest version of Uglify and parallelized the execution, but didn’t find anything that really did what I wanted.
I wrote a tiny tool to do this, and hope to publish it at some point. Should speed things up substantially (people see similar wins using webpack when switching to the Uglify webpack plugin that parallelizes the work).
As a hack for the time being, you can write a shell script (or node script) that uses multiple processes to minify the code, and then disable that optimization in your
r.jsconfig