docs(audits): PathBuf and Arc<Path> RSS overhead per FileEntry#3704
Merged
Conversation
Adds an audit for task #1048 quantifying the path-storage portion of the 100K-files RSS gap (87.5 vs 7.4 MB at v0.5; 42.6 vs 7.9 MB current per the flist-memory baseline). Per-entry breakdown of `name: PathBuf` (24 B inline + heap with capacity slack) and `dirname: Arc<Path>` (16 B inline + 16 B `ArcInner` header), comparison to upstream's pool-allocated `struct file_struct` + `lastdir` cache from `flist.c`/`rsync.h`, and a test/benchmark plan reusing the existing file-entry memory benchmark. Recommends an `Arc<[u8]>` per-flist arena with `(offset, len)` slice fields as the natural shape for #1050, with `Box<[u8]>` post-sort as the smaller mechanical fallback.
4 tasks
oferchen
added a commit
that referenced
this pull request
May 18, 2026
Adds an audit for task #1048 quantifying the path-storage portion of the 100K-files RSS gap (87.5 vs 7.4 MB at v0.5; 42.6 vs 7.9 MB current per the flist-memory baseline). Per-entry breakdown of `name: PathBuf` (24 B inline + heap with capacity slack) and `dirname: Arc<Path>` (16 B inline + 16 B `ArcInner` header), comparison to upstream's pool-allocated `struct file_struct` + `lastdir` cache from `flist.c`/`rsync.h`, and a test/benchmark plan reusing the existing file-entry memory benchmark. Recommends an `Arc<[u8]>` per-flist arena with `(offset, len)` slice fields as the natural shape for #1050, with `Box<[u8]>` post-sort as the smaller mechanical fallback.
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
Arc<[u8]>per-flist arena with(offset, len)slice fields as the natural Rust port of upstream's pool layout (flist.c:1018-1027,rsync.h:801-830), withBox<[u8]>post-sort as the smaller mechanical fallback.crates/protocol/benches/file_entry_memory.rs(Fix merge directive helpers in CLI filter parsing #1037) and the empirical 100K/1M numbers indocs/benchmarks/flist-memory-baseline-2026-05-01.md.Test plan
crates/protocol/src/flist/entry/{core,extras,constructors,accessors,tests}.rsandcrates/protocol/src/flist/intern.rs.target/interop/upstream-src/rsync-3.4.1/{flist.c,rsync.h,compat.c}.