From: Jeff King <peff@peff.net>
To: Derrick Stolee <derrickstolee@github.com>
Cc: Pavel Rappo <pavel.rappo@gmail.com>,
Git mailing list <git@vger.kernel.org>
Subject: Re: How to reduce pickaxe times for a particular repo?
Date: Fri, 1 Jul 2022 14:21:50 -0400 [thread overview]
Message-ID: <Yr87Pt8/l2Tte/Gd@coredump.intra.peff.net> (raw)
In-Reply-To: <6439e948-ff79-9e10-97f5-378806e25b5b@github.com>
On Tue, Jun 28, 2022 at 09:01:17AM -0400, Derrick Stolee wrote:
> > Typically, a `git log -S/-G` lookup takes around a minute to complete.
> > I would like to significantly reduce that time. How can I do that? I
> > can spend up to 10x more disk space, if required. The machine has 10
> > cores and 32GB of RAM.
>
> You are using -S<string> or -G<regex> to see which commits change the
> number of matches of that <string> or <regex>. If you don't provide a
> pathspec, then Git will search every changed file, including those
> very large binary files.
>
> Perhaps you'd like to start by providing a pathspec that limits the
> search to only the meaningful code files?
I think "-S" will search every file, since it's just counting instances
of the token in each file. But "-G" does a diff first, so it skips
binary files. So you could probably speed it up in general with a
.gitattributes that mark large binary files as such. Sort of the same
concept as your pathspec suggestion (which is a good one), but you don't
have to remember to add it to each invocation. :)
-Peff
prev parent reply other threads:[~2022-07-01 18:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-28 10:50 How to reduce pickaxe times for a particular repo? Pavel Rappo
2022-06-28 11:35 ` Ævar Arnfjörð Bjarmason
2022-06-28 12:35 ` Pavel Rappo
2022-06-29 12:31 ` Ævar Arnfjörð Bjarmason
2022-06-28 13:01 ` Derrick Stolee
2022-07-01 18:21 ` Jeff King [this message]
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=Yr87Pt8/l2Tte/Gd@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=derrickstolee@github.com \
--cc=git@vger.kernel.org \
--cc=pavel.rappo@gmail.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).