docs: parallel traversal design (#43) - #139
Merged
Merged
Conversation
Design of record for parallel directory traversal and --sort, settled with the user: worker pool over directories + one emission-ordering layer owning the sink; four --sort modes (none/dir/subtree/tree) as a rising-cost spectrum; single -j/--jobs knob for walk + exec; mode-scoped defaults (find/fd/rg = all cores + none; modern = max(1,min(cores-1,15)) + dir); concurrency correctness for prune/quit/depth/exit-code; a separate --config=tsan + clang-tsan CI cell landed with the threads; phased as a chain of stacked PRs. No code yet -- this is the spec to build to.
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.
Design-of-record for the flagship parallel traversal (#43), settled in discussion. No code - this is the spec the implementation PRs build to.
Decisions captured
--sortspectrum (rising cost):none->dir(per-dir listing) ->subtree(contiguous subtrees, bounded buffer) ->tree(global path order, full buffer).namestays an alias fordir.-j N/--jobsknob caps walk +-exec/-captureconcurrency;-j 1= sequential.find/fd/rg= all cores +--sort=none;modern=max(1, min(cores-1, 15))workers +--sort=dir.-prune/-quit/-depth, exit-code model, and thread-safety (VFS already thread-safe; sink/captures/summary funnelled through the ordering layer or sharded).--config=tsan+clang-tsanCI cell, landed in the same PR that introduces threads.none+ tsan ->dir->subtree->tree->-j+ mode defaults).Formatted/linted via
trunk(prettier + markdownlint clean).