Closed Bug 2071187 Opened 2 months ago Closed 2 months ago

Enable parallel git checkout with `checkout.workers` during bootstrap and configure it with `./mach vcs-setup`

Categories

(Firefox Build System :: Bootstrap Configuration, enhancement)

enhancement

Tracking

(firefox158 fixed)

RESOLVED FIXED
158 Branch
Tracking Status
firefox158 --- fixed

People

(Reporter: ahochheiden, Assigned: ahochheiden)

References

Details

Attachments

(2 external files)

git writes the working tree with one thread unless checkout.workers is set. I tested one worker per core and the initial checkout after git clone went from 80s down to 27s on Windows, 108s to 39s on Windows CI workers (8 cores), and 28s to 13s Linux CI workers (8 cores). It applies to any checkout that moves HEAD across at least 100 files too, a switch between the current main and beta went from 23s to 14s for me locally.

git writes the working tree with one thread unless checkout.workers is set.
With one worker per core my testing shows checkouts 50% to 65% faster, both
locally and in CI. That covers the initial checkout after the clone and any
later checkout that moves HEAD across at least 100 files.

My local testing showed a switch between main and beta going from 23s to 14s.
It's possible for this setting to be a regression on niche hardware (slow hdds
or very few cores), so we only set it by default when it hasn't already been
set. A user can set checkout.workers = 1 in the repo config or the global
config and they will opt out for good.

Pushed by ahochheiden@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/8e17871d1fd7 https://hg.mozilla.org/integration/autoland/rev/947960580131 Enable parallel git checkout in bootstrap and `./mach vcs-setup` r=firefox-build-system-reviewers,sergesanspaille
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch
See Also: → 2074878
Pushed by ahochheiden@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/5d2eccb08fd2 https://hg.mozilla.org/integration/autoland/rev/9dad93198d85 Only set `checkout.workers` for the initial checkout in `bin\bootstrap.py` r=firefox-build-system-reviewers,sergesanspaille
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: