Repository navigation
Conversation
wp-build runs half as many builds at once as there are cores. On a 4-core machine, such as a GitHub-hosted runner, that is only 2. Let WP_BUILD_CONCURRENCY override it, and set it to 4 in CI build steps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013ccWsAUiodTmx9cbyUUURG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013ccWsAUiodTmx9cbyUUURG
🤖 PR meta 🤖🏷️ LabelsThis pull request needs exactly one label indicating its type, and has 0.
Read more about Type labels in Gutenberg. If you cannot add labels yourself, a reviewer can do it for you. 📦 Bundle sizeSize Change: 0 B Total Size: 8.58 MB
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
🏁 Flaky testsSome tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information. Actions are reachable via RIGHT/LEFT arrow keys (Site Editor v2) in
|
This branch has not been deployed
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.
What?
Follow up to #79889.
Adds a
WP_BUILD_CONCURRENCYenvironment variable towp-buildto set how many builds run at once, and sets it to 4 in the CI steps that run the build.Why?
wp-buildruns half as many builds at once as there are cores. On a 4-core machine, such as a GitHub-hosted runner or a cloud dev container, that is only 2, and the CPU sits half idle.wp-buildbundling step on a 4-core, 15 GB container, 3 runs each:The default stays at half the cores, so large projects keep the memory protection from #79889.
How?
getBuildConcurrency()returnsWP_BUILD_CONCURRENCYwhen set, and the current default otherwise. A value that is not a whole number of 1 or more stops the build with an error.WP_BUILD_CONCURRENCY: 4, matching the 4 cores of GitHub's standard Linux runners.Testing Instructions
No Playground link: this changes the build tool, not the editor.
npm run buildand check the log saysUsing build concurrency: <half your cores>.WP_BUILD_CONCURRENCY=4 npm run buildand check it saysUsing build concurrency: 4, and that it finishes faster on a machine with 4 or fewer cores.WP_BUILD_CONCURRENCY=abc npm run buildand check it stops withWP_BUILD_CONCURRENCY must be a whole number of 1 or more, not "abc".npm run test:unit -- packages/wp-build/lib/test/build-concurrency.js. The new tests fail on trunk and pass here.Testing Instructions for Keyboard
Not applicable, no UI change.
Screenshots or screencast
Not applicable, no UI change. Build times are in the table above.
Use of AI Tools
Written with Claude Code, reviewed by the author.
Generated by Claude Code