Parallelise worktree checkout #5

Open
opened 2026-11-08 21:28:03 +11:00 by unkin-agent · 0 comments
Member

Problem: git worktree add races on a shared mirror (failed to read worktrees/<x>/commondir), so worktree commands are serialised per repo. A cold 300-env deploy then pays ~0.27s per add serially.

Proposal: serialise only git worktree add --no-checkout (metadata), then run the checkout (git -C <wt> checkout/reset --hard) in parallel under the -j slots.

Acceptance: cold 300-env deploy at -j8 shows no commondir failures across 12 runs and is no slower than the unserialised baseline (~16s on the bench repo).

Problem: `git worktree add` races on a shared mirror (`failed to read worktrees/<x>/commondir`), so worktree commands are serialised per repo. A cold 300-env deploy then pays ~0.27s per add serially. Proposal: serialise only `git worktree add --no-checkout` (metadata), then run the checkout (`git -C <wt> checkout`/`reset --hard`) in parallel under the `-j` slots. Acceptance: cold 300-env deploy at -j8 shows no commondir failures across 12 runs and is no slower than the unserialised baseline (~16s on the bench repo).
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/w10k#5