From: Jonathan Nieder <jrnieder@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Daniel Koverman <dkoverman@predictiveTechnologies.com>,
Junio C Hamano <gitster@pobox.com>,
"git@vger.kernel.org" <git@vger.kernel.org>,
Nasser Grainawi <nasser@codeaurora.org>
Subject: Re: Why does send-pack call pack-objects for all remote refs?
Date: Mon, 14 Dec 2015 14:31:55 -0800 [thread overview]
Message-ID: <20151214223155.GA6594@google.com> (raw)
In-Reply-To: <20151214210429.GC14788@sigill.intra.peff.net>
Jeff King wrote:
> Hmm. I guess that makes sense. The bitmap we want is the set difference
> between the objects we are sending, and the tips the other side has. If
> we have a bitmap at each ref tip, that's very fast. But if you have a
> very large number of refs, we don't make one for each ref, and it has to
> fallback to walking to the nearest one (and it ends up worse than a
> regular walk, because it's filling in the bitmap for each tree, rather
> than just doing the "good enough" commit walk that we usually do).
>
> I suspect there's room for improvement in the way we select commits to
> store bitmaps for (so that the average walk is smaller). But it's rather
> tricky; there's not a single constant to change to make it work better.
Git gc and JGit GC differ here. JGit partitions the commits being
packed by branch and then runs a selection algorithm on each part.
Git runs a selection once on a list of all commits.
Some effects:
- JGit selects more bitmaps, so the gc takes longer and the resulting
bitmap file is larger (bad)
- JGit is more likely to have bitmaps for the commits involved in
pushes and fetches (good)
The commit selection code, for reference:
https://eclipse.googlesource.com/jgit/jgit/+/86af34e1/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java#151
https://kernel.googlesource.com/pub/scm/git/git/+/ed1c9977/pack-bitmap-write.c#383
Thoughts?
Jonathan
next prev parent reply other threads:[~2015-12-14 22:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-07 21:02 Why does send-pack call pack-objects for all remote refs? Daniel Koverman
2015-12-07 22:41 ` Junio C Hamano
2015-12-07 22:57 ` Jeff King
2015-12-08 17:34 ` Daniel Koverman
2015-12-10 4:19 ` Jeff King
2015-12-12 4:15 ` Nasser Grainawi
2015-12-14 13:47 ` Daniel Koverman
2015-12-14 21:04 ` Jeff King
2015-12-14 22:31 ` Jonathan Nieder [this message]
2015-12-14 22:37 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151214223155.GA6594@google.com \
--to=jrnieder@gmail.com \
--cc=dkoverman@predictiveTechnologies.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=nasser@codeaurora.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.