Re: "git-send-pack"
From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:42:01
On Thu, 30 Jun 2005, H. Peter Anvin wrote:
For producing minimum network traffic, I think something like this would work:
In the "minimum traffic", the thing to look at is number of packets, and penalize further for anything that requires a synchronous reply. That's why I'd suggest just letting the client stream out the list of objects it has - it may appear wasteful to stream out even a thousand SHA1's, but hey, that's just 20kB worth of data, and especially if there is no synchronous stuff, that's just 15 ethernet packets. For the server side, looking up a thousand SHA's is pretty easy (it's _really_ cheap if the server ends up using a few big packed objects: you don't even have to look at the pack data itself, it can look at just the index and say "yup, I've got it") So I'd go for simple brute force over anything that needs to discuss things and have a back-and-forth between server/client. And making the client do the heavy lifting is the right thing to do (the server will have to create the pack, which can be expensive, but you can tune the delta window for how much CPU the server has) Linus