[update-checkout] make llvm-project be the first project #84786
Merged
+21
−8
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.
Cloning
llvm-project
is always the limiting factor when cloning from an empty directory withupdate-checkout
, as it is the largest repository. If it's not one the first repositories being cloned, the runtime for the script increases. This is even more apparent on machines with a lower number of cores.This patch ensures that
llvm-project
will always be the first repository to get processed when runningupdate-checkout
.Testing locally on a MacBook Pro M4 Pro with 28 processes gives a runtime improvement between 14% and 18%.
./swift/utils/update-checkout --clean --reset-to-remote --clone --scheme main
With the patch:
442.90s user 174.85s system 192% cpu 5:20.23 total
Without the patch:
471.91s user 186.90s system 171% cpu 6:23.50 total
Please note that the benchmark should be repeated multiple times to get more accurate results, as this is also very much network dependent.