Parallelize repository cloning during dev environment setup#72
Draft
Parallelize repository cloning during dev environment setup#72
Conversation
1 task
Agent-Logs-Url: https://github.com/wp-cli/wp-cli-dev/sessions/6509f703-3861-4c87-83a6-f0247ed1904b Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement parallel repository cloning during development setup
Parallelize repository cloning during dev environment setup
Apr 9, 2026
thelovekesh
reviewed
Apr 9, 2026
Agent-Logs-Url: https://github.com/wp-cli/wp-cli-dev/sessions/28119b52-0b7a-445b-b43e-f3189c004e28 Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
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.
Sequential
git clonecalls duringcomposer install/composer updatemade initial dev environment setup unnecessarily slow. The refresh step already usedxargsfor parallelism; cloning did not.Changes
.maintenance/clone-all-repositories.sh: Bash script that orchestrates the full clone + refresh flow. Detects CPU cores vianproc(Linux) orsysctl -n hw.logicalcpu(macOS), defaulting to 4 if neither is available. Fetches the repository list from the GitHub API usingcurl, parses JSON withjq, filters the skip list, applies the destination map, then clones missing repos and refreshes all repos in parallel usingxargs -P$CORES..maintenance/clone-repository.sh: Bash helper that clones a single repository, accepting<destination>and<clone_url>as arguments..maintenance/clone-all-repositories.phpand.maintenance/clone-repository.php.composer.json:pre-install-cmdandpre-update-cmdnow callbash .maintenance/clone-all-repositories.sh.