Repository navigation
perf(worktree): write checkouts in parallel, durably - #101
Open
PiquelChips wants to merge 1 commit into
Open
PiquelChips wants to merge 1 commit into
PiquelChips wants to merge 1 commit into
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 34 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
PiquelChips
force-pushed
the
feat/workspaces-durable-checkouts
branch
from
November 22, 2026 18:54
6c7a163 to
b8cfb04
Compare
A checkout wrote its files one at a time, creating each one's directory on the way, and left them to the page cache: a crash could leave a working copy pointing at a revision whose files never reached the disk. Checkouts now create the directories first, then write the files in parallel, a contiguous run per core, which keeps threads off each other's directory locks and is 40% faster than handing files out one at a time. They are durable, with one batch sync of the files and the directories whose entries changed, before the checkout returns. A large checkout syncs its first half in the background while it writes the second, so the final barrier has less left to wait for. The `workspace` benchmark checks a 20,000-file tree out into an empty directory.
PiquelChips
force-pushed
the
feat/workspaces-durable-checkouts
branch
from
November 22, 2026 19:20
b8cfb04 to
ab12a78
Compare
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.
A checkout wrote its files one at a time, creating each one's directory on the way, and left them in the page cache: a crash could leave the working copy pointing at a revision whose files never reached the disk.
Checkouts now:
Benchmark: the new
workspacebenchmark checks a 20,000-file tree out into an empty directory. It takes about 260 ms, most of it the durable sync: ext4 needs about 190 ms just to write the files back.Note
Written by Claude Opus 5.5 in Claude Code (via T3 Code)