Skip to content

feat(protocol): add path interning for FileEntry dirname deduplication - #2533

Merged
oferchen merged 1 commit into
masterfrom
feat/path-interning
Feb 27, 2026
Merged

oferchen merged 1 commit into
masterfrom
feat/path-interning

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Add PathInterner to crates/protocol/src/flist/intern.rs using HashMap<PathBuf, Arc<Path>> for deduplication
  • Add dirname: Arc<Path> field to FileEntry with accessor and setter
  • Wire interning into FileListReader::read_entry() so all entries in the same directory share a single Arc<Path> allocation
  • Mirrors upstream flist.c dirname shared pointer pool

Test plan

  • 4500 protocol tests pass
  • 22598 workspace tests pass
  • cargo clippy clean
  • cargo fmt clean

@github-actions github-actions Bot added the enhancement New feature or request label Feb 27, 2026
@oferchen
oferchen force-pushed the feat/path-interning branch from 18d445f to d9122d1 Compare February 27, 2026 19:01
Add PathInterner that deduplicates parent directory paths across file
list entries using Arc<Path>, mirroring upstream flist.c dirname shared
pointer pool. Wire into FileListReader to automatically intern dirnames
during decode, so all entries in the same directory share a single
allocation.
@oferchen
oferchen force-pushed the feat/path-interning branch from d9122d1 to b32409d Compare February 27, 2026 19:02
@oferchen
oferchen merged commit 19cd6f0 into master Feb 27, 2026
4 checks passed
@oferchen
oferchen deleted the feat/path-interning branch February 27, 2026 19:03
oferchen added a commit that referenced this pull request May 1, 2026
#2533)

Add PathInterner that deduplicates parent directory paths across file
list entries using Arc<Path>, mirroring upstream flist.c dirname shared
pointer pool. Wire into FileListReader to automatically intern dirnames
during decode, so all entries in the same directory share a single
allocation.
oferchen added a commit that referenced this pull request May 5, 2026
#2533)

Add PathInterner that deduplicates parent directory paths across file
list entries using Arc<Path>, mirroring upstream flist.c dirname shared
pointer pool. Wire into FileListReader to automatically intern dirnames
during decode, so all entries in the same directory share a single
allocation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant