Skip to content

docs(audits): RSS gap from PathBuf and Arc<Path> per FileEntry#3834

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

docs(audits): RSS gap from PathBuf and Arc<Path> per FileEntry#3834
oferchen merged 1 commit into
masterfrom
docs/rss-pathbuf-overhead-1048

Conversation

@oferchen
Copy link
Copy Markdown
Owner

@oferchen oferchen commented May 7, 2026

Summary

  • Audit FileEntry layout (crates/flist/src/entry.rs,
    crates/protocol/src/flist/entry/core.rs) and quantify per-entry
    heap allocations: PathBuf header + capacity slack, Arc<Path>
    fat pointer + ArcInner header, Option<Box<FileEntryExtras>>
    pointer + box body.
  • Compare to upstream flist.c:make_file() pool-allocated
    file_struct with flexible-array basename, lastdir-shared
    dirname pointer, and OPT_EXTRA(f, bump) extras packed before
    the header.
  • Propose five reductions in priority order: Box<Path> over
    PathBuf, per-flist basename arena with (start, len) indices,
    packed extras in the same arena allocation, basename interning,
    and a bumpalo-style bump allocator for the whole FileList.

Closes task #1048.

Test plan

  • No code changes; documentation only.

Audit per-entry path overhead in FileEntry vs upstream's pool-allocated
file_struct, quantify the RSS gap at 100K entries, and propose five
reduction strategies (Box<Path>, basename arena, packed extras, basename
interning, bump allocator) with implementation cost and recommended
sequencing. Closes task #1048.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 7, 2026
@oferchen oferchen merged commit fd2bdcf into master May 7, 2026
8 checks passed
@oferchen oferchen deleted the docs/rss-pathbuf-overhead-1048 branch May 8, 2026 03:48
oferchen added a commit that referenced this pull request May 18, 2026
Audit per-entry path overhead in FileEntry vs upstream's pool-allocated
file_struct, quantify the RSS gap at 100K entries, and propose five
reduction strategies (Box<Path>, basename arena, packed extras, basename
interning, bump allocator) with implementation cost and recommended
sequencing. Closes task #1048.
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