Re: Git-aware HTTP transport
- From
- david@lang.hm <david@lang.hm>
- Date
- Aug 28, 2008, 17:26 UTC
- Message-ID
- <alpine.DEB.1.10.0808281023200.2713@asgard.lang.hm>
- In-Reply-To
- <20080828145706.GB21072@spearce.org>
On Thu, 28 Aug 2008, Shawn O. Pearce wrote:
Show 11 quoted lines
> Junio C Hamano <gitster@pobox.com> wrote: >> "Shawn O. Pearce" <spearce@spearce.org> writes: >> >> It appears that you really meant "Binary", as opposed to "Hexadecimal" >> that show-ref example illustrate, judging from the later 3,276 number. >> I'd prefer hexadecimal here. > > Yes, I really did mean for this part of the protocol to be in binary. > We have to exchange a bunch of commits to figure out what is common. > The binary form is 1/2 the size of the hexadecimal form, resulting > in fewer TCP packets for the same request.
except that HTTP cannot transport binary data, if you feed it binary data it then encodes it into 7-bit safe forms for transport.
while it's true that it can pack it more efficiantly than hex, it's not double the density.
> Reading/writing the SHA-1s in binary is usually faster than doing > it in hex; you don't have to go through the formatting routines. > So there's a few less CPU cycles on the server end.
except you then need to go through the formatting routines to send it via HTTP.
David Lang