Re: [PATCH 0/3] send-pack: avoid resending unchanged objects after rebasing
- From
Marc Strapetz <marc.strapetz@syntevo.com>
- Date
- Nov 4, 2026, 17:13 UTC
- Message-ID
- <54bbe02c-3319-477e-a9d9-024ef7027142@syntevo.com>
- In-Reply-To
- <pull.2281.git.1793029565.gitgitgadget@gmail.com>
On 26/10/2026 16:46, Marc Strapetz via GitGitGadget wrote:
> This series teaches send-pack to request inspection of the old tip's tree > before packing, so more receiver-known objects can be excluded.
I'd like to give this series one more try, because I think the default push path still misses a worthwhile optimization opportunity.
Rebase-and-force-update workflows are common enough that avoiding redundant transfer on the default path appears worth evaluating. Junio pointed out that push negotiation addresses the same general problem. This series instead targets the non-negotiated default path: it uses the already advertised old destination tip, with no additional round trip, server change, or protocol change.
For qualifying non-fast-forward branch updates, this series can avoid resending objects already present at the destination. This can reduce pack size and network transfer, as well as client-side packing and server-side receive and indexing work. The scope is narrow: ordinary fast-forward pushes are unaffected, and the additional inspection is limited to forced updates with a locally available old tip.
The current measurements show both the potential and the tradeoff: the small cases improve, while the low-benefit worst-case fixture adds about 8% packing time for a negligible size reduction. These measurements cover only local pack generation; they do not include the primary expected benefits of a smaller pack: reduced network transfer and less receive and indexing work on the server. I would appreciate another look at whether this targeted optimization is worthwhile on the default path, and whether its current scope is narrow enough.
I've added Taylor and Derrick because of their work on pack generation and revision traversal. I'd be interested to hear whether this looks like a reasonable tradeoff for rewritten branch updates, or whether there is a simpler approach worth exploring.
-Marc