Repository navigation
fix(builtins): list ls -R and tree through bounded bulk walk batches - #2819
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | 48537c2 | Commit Preview URL Branch Preview URL |
Nov 03 2026, 06:12 AM |
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.
What changed
ls -Randtreenow list directories through the same boundedFileSystem::walkbatches asfindanddu. On a backend with a bulk walk (one path-prefix query), they take one call per batch instead of oneread_dirper directory. On other backends they still list each directory once.WalkOptions::skip_hiddenhint. Without-a, the default walk never enters dot directories thatls -R/treedo not print (e.g..git).treecaps each batch at its remaining entry budget, so prefetch never reads far past wheretreestops. With-Iit keeps plainread_dir, because the walk cannot prune by pattern.Why
Follow-up to #2816. On remote filesystems (~10 ms per call)
ls -R/treewere the last tree walkers paying one round trip per directory.Before / After
cargo bench --bench remote_fs -- --counts, bashkit checkout (3.7k files), index+walk backend:ls -R cratestree cratesPlain backend: unchanged at one
read_dirper directory, and hidden directories are still not entered (ls_recursive_and_tree_skip_hidden_directories). The output is identical with and without bulk walk, using a 100-entry backend page (ls_recursive_and_tree_output_is_the_same_with_bulk_walk, covering-a,-l,-L,-d,-I, symlinks and hidden dirs).Risk
ls -R/treecould change. This is covered by differential tests against the plain path.Checklist
WalkOptionsgains a field; backends may ignore the hint)Generated by Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.