Repository navigation
feat(flist): add Adaptive Radix Tree backend behind art feature - #2493
Merged
Merged
Conversation
Add optional ART-backed data structures (rart 0.3.1) to the flist crate for O(k) sorted insertion and prefix range queries on file lists. - New art_file_list.rs: ArtFileList type with insert, get, iter, prefix_range, into_sorted_vec, FromIterator impl - New sort.rs: strategy dispatch module centralizing ART-vs-sort choice so callers use a single function instead of duplicated cfg blocks - batched_stat.rs: ART-backed BatchedStatCache using VersionedAdaptiveRadixTree with null-terminated keys - file_list_walker.rs: ART-backed visited set and directory sorting - parallel.rs: 4 sort sites simplified to sort::sort_file_entries() and sort::sort_dir_entries() calls All paths use null-terminated VectorKeys (via path_to_art_key) to satisfy the ART prefix-free key invariant. All 4 feature combinations (none, art, parallel, art+parallel) pass fmt, clippy, and 469-522 tests.
oferchen
added a commit
that referenced
this pull request
May 1, 2026
Add optional ART-backed data structures (rart 0.3.1) to the flist crate for O(k) sorted insertion and prefix range queries on file lists. - New art_file_list.rs: ArtFileList type with insert, get, iter, prefix_range, into_sorted_vec, FromIterator impl - New sort.rs: strategy dispatch module centralizing ART-vs-sort choice so callers use a single function instead of duplicated cfg blocks - batched_stat.rs: ART-backed BatchedStatCache using VersionedAdaptiveRadixTree with null-terminated keys - file_list_walker.rs: ART-backed visited set and directory sorting - parallel.rs: 4 sort sites simplified to sort::sort_file_entries() and sort::sort_dir_entries() calls All paths use null-terminated VectorKeys (via path_to_art_key) to satisfy the ART prefix-free key invariant. All 4 feature combinations (none, art, parallel, art+parallel) pass fmt, clippy, and 469-522 tests.
oferchen
added a commit
that referenced
this pull request
May 5, 2026
Add optional ART-backed data structures (rart 0.3.1) to the flist crate for O(k) sorted insertion and prefix range queries on file lists. - New art_file_list.rs: ArtFileList type with insert, get, iter, prefix_range, into_sorted_vec, FromIterator impl - New sort.rs: strategy dispatch module centralizing ART-vs-sort choice so callers use a single function instead of duplicated cfg blocks - batched_stat.rs: ART-backed BatchedStatCache using VersionedAdaptiveRadixTree with null-terminated keys - file_list_walker.rs: ART-backed visited set and directory sorting - parallel.rs: 4 sort sites simplified to sort::sort_file_entries() and sort::sort_dir_entries() calls All paths use null-terminated VectorKeys (via path_to_art_key) to satisfy the ART prefix-free key invariant. All 4 feature combinations (none, art, parallel, art+parallel) pass fmt, clippy, and 469-522 tests.
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.
Summary
rart0.3.1) to theflistcrate behind theartfeature flagArtFileListtype provides O(k) sorted insertion, prefix range queries, and ordered iteration without explicit sort passessort.rsstrategy dispatch module centralizes ART-vs-sort logic (Strategy Pattern), eliminating 4 duplicated#[cfg]blocks inparallel.rsand 2 infile_list_walker.rsBatchedStatCacheusingVersionedAdaptiveRadixTreewithMutexfor thread-safe metadata cachingvisitedset inFileListWalkerfor symlink cycle detectionVectorKey(viapath_to_art_key) to satisfy the ART prefix-free key invariantDesign Patterns Applied
sort.rsdispatches between ART insertion sort andsort_unstableat compile time via feature flagssort::sort_file_entries()abstraction, not onrarttypes directlyart_file_list.rsowns the ART file list type,sort.rsowns the sorting strategy dispatchTest plan
cargo fmt --all -- --checkcargo clippy -p flist --all-targets --all-features --no-deps -D warningscargo clippy -p flist --all-targets --no-default-features --no-deps -D warningscargo clippy -p flist --all-targets --features art --no-deps -D warningscargo nextest run -p flist --no-default-features(469 tests)cargo nextest run -p flist --features art(475 tests)cargo nextest run -p flist --features art,parallel(522 tests)cargo nextest run -p flist --all-features(522 tests)