Thread (24 messages) flat view 24 messages, 8 authors, 2016-06-15

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:
In your linux-2.6 tree, there are currently 54,204 objects, and that is 
after less than one full 2.6.x kernel release cycle.  That's a megabyte 
of SHA1s.
But that's _all_ objects. There are "only" 4040 commit objects (which are
always the starting point for a search). 

So streaming out the commit objects a few hundred at a time is actually 
a very simple strategy. 

Also, note that the server is usually _more_ ahead than the client is, and 
the server is the one that potentially has lots of commits that the 
client doesn't have. Not the other way around. So if the client makes a 
list of it's top commits, it almost certainly won't have to make a very 
long list until the server can tell it "ok, stop, I've seen it".

Yeah, maybe we want to limit the "burst" to 70 sha1's, since that will fit 
in a regular-sized ethernet packet, but whatever - you'd burst out your 
commits "latest first", so you'd never even get to the current 4040 unless 
you've literally done the kind of work we've done in the git tree for the 
last 3 months _and_you've_not_pulled_from_that_server_in_the_whole_time_.

		Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help