From: Taylor Blau <me@ttaylorr.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Kyle Zhao via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org, Derrick Stolee <derrickstolee@github.com>,
Kyle Zhao <kylezhao@tencent.com>
Subject: Re: [PATCH] send-pack.c: add config push.useBitmaps
Date: Wed, 15 Jun 2022 17:32:01 -0400 [thread overview]
Message-ID: <YqpP0b2zt0sWZD0B@nand.local> (raw)
In-Reply-To: <220615.86edzpy9m6.gmgdl@evledraar.gmail.com>
On Wed, Jun 15, 2022 at 09:47:58PM +0200, Ævar Arnfjörð Bjarmason wrote:
> Refresh my memory, we always use them if we find them now, correct?
> I.e. if repack.writebitmaps=true
Kind of. `rev-list` has an opt-in `--use-bitmap-index` option, and
`pack-objects` has `pack.useBitmaps` which controls whether or not
bitmaps are read.
So `git rev-list --objects HEAD` won't use any bitmaps, even if they
exist, but `git rev-list --objects --use-bitmap-index HEAD` will. There
there's a good reason not to use bitmaps by default, which is that they
(effectively) randomize the ordering of your output.
`pack-objects` behaves slightly differently, cf. its
`use_bitmap_index{,default}` variables to see how that works.
> This doesn't make it clear: Are we now going to ignore them for "push"
> by default, even if they exist? I.e. a change in the current default.
>
> I think I recall from the previous discussions that it was a bit of hit
> & miss, maybe we're confident that they're almost (or always?) bad for
> "push", but I think there *are* cases where they help.
Yeah. In theory they should help most of the time as long as the bitmaps
are kept reasonably up-to-date. There's a tradeoff between using bitmaps
and how much walking between bitmap and ref-tips is required. Since
every object we encounter between the most recent bitmap and the thing
we're trying to generate a bitmap for has to incur extra overhead in
order to find and mark its position in the bitmap being generated,
there's a certain point at which it would have been faster to just walk
down to the roots and avoid bitmaps altogether.
But I suspect that in this case the bitmaps are just simply stale, and
that a "git repack -adb" or more aggressive background maintenance would
make things quite a bit faster.
Thanks,
Taylor
next prev parent reply other threads:[~2022-06-15 21:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-15 11:08 [PATCH] send-pack.c: add config push.useBitmaps Kyle Zhao via GitGitGadget
2022-06-15 13:09 ` Derrick Stolee
2022-06-15 21:24 ` Taylor Blau
2022-06-15 19:47 ` Ævar Arnfjörð Bjarmason
2022-06-15 21:32 ` Taylor Blau [this message]
2022-06-16 2:13 ` [Internet]Re: " kylezhao(赵柯宇)
2022-06-16 3:36 ` [PATCH v2] " Kyle Zhao via GitGitGadget
2022-06-16 13:02 ` Derrick Stolee
2022-06-16 13:38 ` Ævar Arnfjörð Bjarmason
2022-06-16 15:11 ` [Internet]Re: " kylezhao(赵柯宇)
2022-06-16 21:17 ` Taylor Blau
2022-06-16 18:12 ` Junio C Hamano
2022-06-16 21:04 ` Jeff King
2022-06-17 3:59 ` [PATCH v3] " Kyle Zhao via GitGitGadget
2022-06-17 17:01 ` Junio C Hamano
2022-06-17 19:06 ` [PATCH v4] " Kyle Zhao via GitGitGadget
2022-06-17 21:32 ` Junio C Hamano
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=YqpP0b2zt0sWZD0B@nand.local \
--to=me@ttaylorr.com \
--cc=avarab@gmail.com \
--cc=derrickstolee@github.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=kylezhao@tencent.com \
/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 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 NNTP newsgroup(s).