Skip to content

docs(audits): Vec<FileEntry> vs upstream pool allocator (#1050)#3939

Merged
oferchen merged 1 commit into
masterfrom
audits/vec-fileentry-vs-pool
May 7, 2026
Merged

docs(audits): Vec<FileEntry> vs upstream pool allocator (#1050)#3939
oferchen merged 1 commit into
masterfrom
audits/vec-fileentry-vs-pool

Conversation

@oferchen
Copy link
Copy Markdown
Owner

@oferchen oferchen commented May 7, 2026

Summary

  • Static audit comparing upstream lib/pool_alloc.c slabs (one allocation per file_struct plus extras) against oc-rsync's Vec<FileEntry> with per-entry PathBuf and Box<FileEntryExtras> heap chunks (~200 B + 3-4 mallocs each).
  • Lists bumpalo and typed-arena as the viable single-slab candidates, with notes on Drop avoidance, basename slicing, and Arc<Path> dirname interning.
  • Documents risks: arena lifetimes through engine/transfer/cli, Drop semantics for FileEntryExtras buffers, signal-cancel cleanup, and INC_RECURSE segment sharing.
  • Cross-refs Default daemon shorthand hosts to localhost #1048 (PathBuf overhead).

Test plan

  • Doc-only change; CI fmt/clippy/nextest must pass.

Static audit comparing upstream rsync's per-flist slab pool
(`lib/pool_alloc.c`) against oc-rsync's `Vec<FileEntry>` plus
per-entry `PathBuf` and `Box<FileEntryExtras>` heap allocations.
Lists bumpalo / typed-arena candidates for collapsing the file
list into a single slab and the lifetime, Drop, and signal-cleanup
risks that gate the pilot.
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 7, 2026
@oferchen oferchen merged commit d75ed49 into master May 7, 2026
8 checks passed
@oferchen oferchen deleted the audits/vec-fileentry-vs-pool branch May 8, 2026 03:47
oferchen added a commit that referenced this pull request May 18, 2026
Static audit comparing upstream rsync's per-flist slab pool
(`lib/pool_alloc.c`) against oc-rsync's `Vec<FileEntry>` plus
per-entry `PathBuf` and `Box<FileEntryExtras>` heap allocations.
Lists bumpalo / typed-arena candidates for collapsing the file
list into a single slab and the lifetime, Drop, and signal-cleanup
risks that gate the pilot.
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