Repository navigation
perf: implement receiver quick-check to skip unchanged files - #2343
Merged
Merged
Conversation
Add upstream rsync's quick-check algorithm (generator.c:617) to the receiver's file transfer list construction. Before sending a file through the delta pipeline, compare destination size + mtime against source. When both match, skip the file and apply metadata only. This eliminates the full pipeline for unchanged files: no signature generation, no network round-trip, no temp file, no rename. Also add apply_metadata_with_cached_stat() to reuse the stat result from quick-check, halving stat syscalls for skipped files from 20K to 10K. Benchmark (10K files, loopback daemon, aarch64): - Incremental (no change): 1,020ms → 120ms (8.5x faster, 1.22x faster than upstream's 146ms) - Syscalls: 394,320 → 10,261 (matching upstream's 10,445) - Initial copy: no regression (1.51x faster than upstream)
oferchen
added a commit
that referenced
this pull request
May 1, 2026
perf: implement receiver quick-check to skip unchanged files
oferchen
added a commit
that referenced
this pull request
May 5, 2026
perf: implement receiver quick-check to skip unchanged files
3 tasks 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
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
generator.c:617 quick_check_ok()) in the receiver's file transfer list constructionset_file_attrs())apply_metadata_with_cached_stat()to reuse the stat result from quick-check, halving stat syscalls for skipped filesBenchmark (10K files, loopback daemon, aarch64)
Test plan
cargo fmt --all -- --checkcargo clippy --workspace --all-targets --all-features --no-deps -D warningscargo nextest run --workspace --all-features— 21,724 passed