Thread (7 messages) flat view 7 messages, 3 authors, 2016-06-15

Re: [PATCH 1/2] upload-pack: avoid parsing objects during ref advertisement

From: Shawn Pearce <hidden>
Date: 2016-06-15 22:55:56

Possibly related (same subject, not in this thread)

On Fri, Jan 6, 2012 at 11:17 AM, Jeff King [off-list ref] wrote:
When we advertise a ref, the first thing we do is parse the
pointed-to object. This gives us two things:
...
The downside is that we are no longer verifying objects that
we advertise by fully parsing them (however, we do still
know we actually have them, because sha1_object_info must
find them to get the type). While we might fail to detect a
corrupt object here, if the client actually fetches the
object, we will parse (and verify) it then.
As you explain, its not necessary to verify during the advertisement
phase. Its fine to delay verification to when a client actually
"wants" the object.
On a repository with 120K refs, the advertisement portion of
upload-pack goes from ~3.4s to 3.2s (the failure to speed up
more is largely due to the fact that most of these refs are
tags, which need dereferenced to find the tag destination
anyway).
Why aren't we using the peeled information from the packed-refs file?
JGit does this and it saves a lot of time on advertisements from a
well packed repository.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help