All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, Michael Haggerty <mhagger@alum.mit.edu>
Subject: Re: [PATCH] pretty: lazy-load commit data when expanding user-format
Date: Thu, 28 Jan 2021 20:11:07 -0500	[thread overview]
Message-ID: <YBNgq++oV3HorxVM@coredump.intra.peff.net> (raw)
In-Reply-To: <87eei4pu3c.fsf@evledraar.gmail.com>

On Thu, Jan 28, 2021 at 11:36:23PM +0100, Ævar Arnfjörð Bjarmason wrote:

> > -for format in %H %h %T %t %P %p %h-%h-%h
> > +for format in %H %h %T %t %P %p %h-%h-%h %an-%ae-%s
> >  do
> >  	test_perf "log with $format" "
> >  		git log --format=\"$format\" >/dev/null
> 
> 
> While we're at it it would be nice to have a few more formats that have
> to do with the body in some way in those tests, and stess things like
> mailmap/trailers etc.
> 
>     %s
>     %b
>     %B
>     %N
>     %aN-%aE
>     %cn-%ce
>     %cN-%cE
>     %d
>     %D
>     %(trailers)
> 
> Just paging over the git-log manpage, that seems to stress most of the
> codepaths, i.e. subject/body, but also things like notes, .mailmap, ref
> names, and body parsing (trailers).

I'd prefer not to do so in this patch, since most of those aren't
providing any new data.

I don't mind _too_ much if you'd like to do so on top for general
regression-testing, but I'm generally a bit hesitant to throw a lot of
stuff into the perf suite without a sense of what it's measuring, just
because it already takes forever to run. So for example, is the
difference between %aN-%aE and %cN-%cE worth spending 21 seconds of CPU
(3 times the 7 seconds it takes to run on the kernel)?

One test to check mailmap performance, or one for trailers, seems like
it might be more directed. I think the existing test is likewise a bit
wasteful in checking %h _and_ %t _and_ %p), though at least it is now
much faster after my patch. ;)

(In the regular test suite, we of course should be covering all these
for correctness already, and I think we do).

-Peff

  reply	other threads:[~2021-01-29  1:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-28 19:57 [PATCH] pretty: lazy-load commit data when expanding user-format Jeff King
2021-01-28 22:36 ` Ævar Arnfjörð Bjarmason
2021-01-29  1:11   ` Jeff King [this message]
2021-01-28 22:58 ` Taylor Blau
2021-01-28 23:25 ` 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=YBNgq++oV3HorxVM@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=mhagger@alum.mit.edu \
    /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.