A push re-sends the blobs a change's replacements name, though the remote holds them issue #136 closed: completed andymccall opened this · 1 comment
andymccall set labels bug ·
closed by change 570e35310f31 ·
andymccall
Fixed in 3180176b: a bundle carries a replacement's new blob only (spec §16 says so now). Measured locally on oxygenhub-android, pushing its two set-up commits (issue #1, issue #2) to an oxy serve remote that already held the history before them:
| oxy 0.6.0 | 3180176b | |
|---|---|---|
| blobs and chunks sent | 2,272 | 1,405 |
| bytes sent | 240 MB | 184 MB |
| time (loopback) | 2.3 s | 1.5 s |
A fresh push of the whole history gains too (478 MB → 366 MB): a long push goes in parts, and each part re-sent the old blobs of files added in earlier parts. The rest is new content. Measuring found issue #138 (oxy serve refused any push over 2 MB).
Found with oxygen#133 (2026-10-25): oxygenhub-android's set-up change removes ~1,100 tracked cache files, and its push carried 2,272 blobs and chunks (over 100 MB).
bundle_of(crates/oxy-core/src/repo/sync.rs) adds, for everyEdit::Replace, both theoldand thenewblob with their chunks, so removing a binary file sends its old content again, though the remote stored it when the file was added. issue #133 makes such a push go through (objects ahead in parts), but it is still far more than it needs.Fix: leave out blobs the remote already has. Negotiation knows the remote's heads: an
oldblob is thenewof an earlier change the remote holds, so it can be skipped (or ask withobjects/a has-check before sending). The receiver needs only that the blobs a change names are stored. Measure with the android repository's history (a fresh hub repo, push, count bytes).