incremental_check() sends one request per file and waits for a reply. For millions of small unchanged files, this adds a full network round-trip per file. On high-latency links this destroys throughput.
Client sends STATUS_CHECK + (path, size, mtime) per file. Server replies STATUS_OK (unchanged) or STATUS_NEXT (send file). For 1M unchanged files on a 100ms RTT link, this takes ~28 hours of round-trips.
Suggested Fix
Batch incremental checks: design a STATUS_CHECK_BATCH message type that sends an array of (path, size, mtime) tuples and receives a bitmap of which files changed. This reduces the O(n) round trips to O(1).
Expected impact
On high-latency links, batching could reduce incremental check time from hours to seconds.
Severity
high
Category
performance
Sub-Agent
perf-analyst (PA-1)
This issue was automatically generated by the issue-creator agent.
## Description
`incremental_check()` sends one request per file and waits for a reply. For millions of small unchanged files, this adds a full network round-trip per file. On high-latency links this destroys throughput.
## Location
src/client/client_send.c:25-62 (incremental_check)
src/shared/file.c:442-560 (receive_incremental_check)
## Current behavior
Client sends STATUS_CHECK + (path, size, mtime) per file. Server replies STATUS_OK (unchanged) or STATUS_NEXT (send file). For 1M unchanged files on a 100ms RTT link, this takes ~28 hours of round-trips.
## Suggested Fix
Batch incremental checks: design a `STATUS_CHECK_BATCH` message type that sends an array of (path, size, mtime) tuples and receives a bitmap of which files changed. This reduces the O(n) round trips to O(1).
## Expected impact
On high-latency links, batching could reduce incremental check time from hours to seconds.
## Severity
high
## Category
performance
## Sub-Agent
perf-analyst (PA-1)
---
_This issue was automatically generated by the issue-creator agent._
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Description
incremental_check()sends one request per file and waits for a reply. For millions of small unchanged files, this adds a full network round-trip per file. On high-latency links this destroys throughput.Location
src/client/client_send.c:25-62 (incremental_check)
src/shared/file.c:442-560 (receive_incremental_check)
Current behavior
Client sends STATUS_CHECK + (path, size, mtime) per file. Server replies STATUS_OK (unchanged) or STATUS_NEXT (send file). For 1M unchanged files on a 100ms RTT link, this takes ~28 hours of round-trips.
Suggested Fix
Batch incremental checks: design a
STATUS_CHECK_BATCHmessage type that sends an array of (path, size, mtime) tuples and receives a bitmap of which files changed. This reduces the O(n) round trips to O(1).Expected impact
On high-latency links, batching could reduce incremental check time from hours to seconds.
Severity
high
Category
performance
Sub-Agent
perf-analyst (PA-1)
This issue was automatically generated by the issue-creator agent.
Fixed in PR #148 — merged into main on 2026-07-29.