All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Jeff King <peff@peff.net>
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 23:36:23 +0100	[thread overview]
Message-ID: <87eei4pu3c.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <YBMXM83xCZvC5WyA@coredump.intra.peff.net>


On Thu, Jan 28 2021, Jeff King wrote:

>   # using git.git as the test repo
>   Test                          HEAD^             HEAD
>   ----------------------------------------------------------------------
>   4205.1: log with %H           0.40(0.39+0.01)   0.03(0.02+0.01) -92.5%
>   4205.2: log with %h           0.45(0.44+0.01)   0.09(0.09+0.00) -80.0%
>   4205.3: log with %T           0.40(0.39+0.00)   0.04(0.04+0.00) -90.0%
>   4205.4: log with %t           0.46(0.46+0.00)   0.09(0.08+0.01) -80.4%
>   4205.5: log with %P           0.39(0.39+0.00)   0.03(0.03+0.00) -92.3%
>   4205.6: log with %p           0.46(0.46+0.00)   0.10(0.09+0.00) -78.3%
>   4205.7: log with %h-%h-%h     0.52(0.51+0.01)   0.15(0.14+0.00) -71.2%
>   4205.8: log with %an-%ae-%s   0.42(0.41+0.00)   0.42(0.41+0.01) +0.0%

Looks nice!

> diff --git a/t/perf/p4205-log-pretty-formats.sh b/t/perf/p4205-log-pretty-formats.sh
> index 7c26f4f337..609fecd65d 100755
> --- a/t/perf/p4205-log-pretty-formats.sh
> +++ b/t/perf/p4205-log-pretty-formats.sh
> @@ -6,7 +6,7 @@ test_description='Tests the performance of various pretty format placeholders'
>  
>  test_perf_default_repo
>  
> -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).

  reply	other threads:[~2021-01-28 22:37 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 [this message]
2021-01-29  1:11   ` Jeff King
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=87eei4pu3c.fsf@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=mhagger@alum.mit.edu \
    --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.