send-pack: set core.warnAmbiguousRefs=false #68
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've been looking into the performance of
git pushfor very large repos. Our users are reporting that 60-80% ofgit pushtime is spent during the "Enumerating objects" phase ofgit pack-objects.A
git pushprocess runs several processes during its run, but one includesgit send-packwhich callsgit pack-objectsand passes the known have/wants intostdinusing object ids. However, the default setting forcore.warnAmbiguousRefsrequiresgit pack-objectsto check for ref names matching theref_rev_parse_rulesarray inrefs.c. This means that every object is triggering at least six "file exists?" queries.When there are a lot of refs, this can add up significantly! My PerfView trace for a simple push measured 3 seconds spent checking these paths.
The fix is to set the global
warn_on_object_refname_ambiguityto 0 for the section that is performing these object reads.In addition to this patch submission, we are looking into merging it into our fork sooner [1].
[1] microsoft#67
Changes in V2: Instead of using the "-c" flag from send-pack, just set the global. I left the name of the cover letter the same to not confuse anyone viewing the message without threading.
Cc: peff@peff.net