Magento2 - Deploy multiple themes at once if using static_content_jobs #4174#4175
Open
johnorourke wants to merge 1 commit intodeployphp:masterfrom
Open
Magento2 - Deploy multiple themes at once if using static_content_jobs #4174#4175johnorourke wants to merge 1 commit intodeployphp:masterfrom
johnorourke wants to merge 1 commit intodeployphp:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Magento 2 theme deployment with multiple themes/locales and multiple CPUs:
This ensures that if you set static_deploy_jobs > 1, and use split deployment, then it will minimise the no. of static:content:deploy commands issued and make best use of multiple CPUs.
NOTE: I did try multiple themes per thread but it kept getting stuck after a while - literally the progress bars not moving - possibly the same issue as #3897 . So right now it just does as many as possible with one per thread.
EXAMPLE:
Previously, this would've run 1 command per theme - with 3 locales that would only be using 3 jobs of a possible 8.
Now, it will calculate that brand1/2/3 all share the same locales, but it can only run brand1+2 together because that's 6 theme/locale combinations, which will make use of 6 jobs. If it also added brand3, that would be 9 theme/locale combinations, so one of the jobs would be running twice as long as the rest.
USE CASE: we have 90 themes and some have 2-4 locales. This took deployment time down from over 1 hour to ~15 mins.