docs(audits): RSS gap from PathBuf and Arc<Path> per FileEntry#3834
Merged
Conversation
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.
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.
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
crates/flist/src/entry.rs,crates/protocol/src/flist/entry/core.rs) and quantify per-entryheap allocations:
PathBufheader + capacity slack,Arc<Path>fat pointer +
ArcInnerheader,Option<Box<FileEntryExtras>>pointer + box body.
flist.c:make_file()pool-allocatedfile_structwith flexible-array basename,lastdir-shareddirname pointer, and
OPT_EXTRA(f, bump)extras packed beforethe header.
Box<Path>overPathBuf, 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 wholeFileList.Closes task #1048.
Test plan