git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/1] send-pack: set core.warnAmbiguousRefs=false
@ 2018-11-06 19:13 Derrick Stolee via GitGitGadget
  2018-11-06 19:13 ` [PATCH 1/1] " Derrick Stolee via GitGitGadget
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Derrick Stolee via GitGitGadget @ 2018-11-06 19:13 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

I've been looking into the performance of git push for very large repos. Our
users are reporting that 60-80% of git push time is spent during the
"Enumerating objects" phase of git pack-objects.

A git push process runs several processes during its run, but one includes 
git send-pack which calls git pack-objects and passes the known have/wants
into stdin using object ids. However, the default setting for 
core.warnAmbiguousRefs requires git pack-objects to check for ref names
matching the ref_rev_parse_rules array in refs.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 for this is simple: set core.warnAmbiguousRefs to false for this
specific call of git pack-objects coming from git send-pack. We don't want
to default it to false for all calls to git pack-objects, as it is valid to
pass ref names instead of object ids. This helps regain these seconds during
a push.

In addition to this patch submission, we are looking into merging it into
our fork sooner [1].

[1] https://github.com/Microsoft/git/pull/67

Derrick Stolee (1):
  send-pack: set core.warnAmbiguousRefs=false

 send-pack.c | 2 ++
 1 file changed, 2 insertions(+)


base-commit: cae598d9980661a978e2df4fb338518f7bf09572
Published-As: https://github.com/gitgitgadget/git/releases/tags/pr-68%2Fderrickstolee%2Fsend-pack-config-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-68/derrickstolee/send-pack-config-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/68
-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-11-07  9:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-06 19:13 [PATCH 0/1] send-pack: set core.warnAmbiguousRefs=false Derrick Stolee via GitGitGadget
2018-11-06 19:13 ` [PATCH 1/1] " Derrick Stolee via GitGitGadget
2018-11-06 19:44 ` [PATCH 0/1] " Jeff King
2018-11-06 19:51   ` Jeff King
2018-11-06 20:16     ` Derrick Stolee
2018-11-06 20:00   ` Derrick Stolee
2018-11-06 20:34 ` [PATCH v2 " Derrick Stolee via GitGitGadget
2018-11-06 20:34   ` [PATCH v2 1/1] pack-objects: ignore ambiguous object warnings Derrick Stolee via GitGitGadget
2018-11-06 21:12     ` Jeff King
2018-11-07  1:54       ` Junio C Hamano
2018-11-07  8:52         ` Junio C Hamano
2018-11-07  9:21           ` Jeff King

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).