Skip to content

docs(audits): PathBuf and Arc<Path> RSS overhead per FileEntry - #3704

Merged
oferchen merged 1 commit into
masterfrom
docs/pathbuf-arc-rss-1048
May 5, 2026
Merged

oferchen merged 1 commit into
masterfrom
docs/pathbuf-arc-rss-1048

Conversation

@oferchen

@oferchen oferchen commented May 5, 2026

Copy link
Copy Markdown
Owner

Summary

Test plan

  • No code changes; doc-only audit. CI fmt/clippy/nextest unaffected.
  • Cited line numbers verified against current crates/protocol/src/flist/entry/{core,extras,constructors,accessors,tests}.rs and crates/protocol/src/flist/intern.rs.
  • Upstream citations verified against target/interop/upstream-src/rsync-3.4.1/{flist.c,rsync.h,compat.c}.
  • No references to forbidden tooling; em-dashes replaced with hyphens.

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.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 5, 2026
@oferchen
oferchen merged commit 915bc5d into master May 5, 2026
8 checks passed
@oferchen
oferchen deleted the docs/pathbuf-arc-rss-1048 branch May 6, 2026 18:57
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.
oferchen added a commit that referenced this pull request Aug 24, 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant