Repository navigation
perf: reduce per-file allocation overhead; bump to v0.5.6 - #2330
Merged
Merged
Conversation
Eliminate ~30K unnecessary heap allocations per 10K-file transfer: - Pass PathBuf by value through walk_path/create_entry (2 fewer clones per file) — moves owned PathBufs instead of clone+discard - Add ChecksumVerifier::finalize_into() for stack-based digest output (avoids Vec allocation in transfer hot path) - Replace vec![0u8; N] with stack array in write_checksum (flist/write.rs) for --checksum mode - Pre-allocate file_list/full_paths Vecs with capacity 4096 (mirrors upstream flist.c FLIST_START_LARGE pattern) Reduces push-to-daemon peak RSS by 11.5% (16.5 MB → 14.6 MB for 10K files). Wall time unchanged (I/O-dominated workload). Update README.md: add push-to-daemon benchmark table, complete project layout (13 missing crates), clarify security claims.
oferchen
added a commit
that referenced
this pull request
May 1, 2026
perf: reduce per-file allocation overhead; bump to v0.5.6
oferchen
added a commit
that referenced
this pull request
May 5, 2026
perf: reduce per-file allocation overhead; bump to v0.5.6
1 task done
oferchen
added a commit
that referenced
this pull request
May 18, 2026
oferchen
added a commit
that referenced
this pull request
May 18, 2026
oferchen
added a commit
that referenced
this pull request
May 18, 2026
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
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
walk_path/create_entry(2 fewer clones per file)ChecksumVerifier::finalize_into()for stack-based digest outputvec![0u8; N]with stack array inwrite_checksumfile_list/full_pathsVecs with capacity 4096Benchmark (push-to-daemon, TCP loopback, Linux aarch64)
Test plan
cargo fmt --all -- --checkcargo clippy --workspace --all-targets --all-features --no-deps -D warningscargo nextest run --workspace --all-features— 21,710 tests pass