From: Rafael Silva <rafaeloliveira.cs@gmail.com>
To: Taylor Blau <me@ttaylorr.com>
Cc: git@vger.kernel.org, Stefan Beller <stefanbeller@gmail.com>,
Junio C Hamano <gitster@pobox.com>,
Derrick Stolee <stolee@gmail.com>
Subject: Re: [PATCH 1/1] blame: remove unnecessary use of get_commit_info()
Date: Tue, 16 Feb 2021 23:25:40 +0100 [thread overview]
Message-ID: <gohp6kpn0z7j2b.fsf@cpm12071.fritz.box> (raw)
In-Reply-To: <YCv8nvJ6faO7esoj@nand.local>
Taylor Blau <me@ttaylorr.com> writes:
> On Tue, Feb 16, 2021 at 05:31:51PM +0100, Rafael Silva wrote:
>> When `git blame --color-by-age`, the determine_line_heat() is called to
>> select how to color the output based on the commit author's date. It
>> uses the get_commit_info() to parse the information into a `commit_info`
>> structure, however, this is actually unnecessary because the
>> determine_line_heat() caller also does the same.
>
> Interesting. It looks like this micro-optimization could have been
> safely performed as early as 25d5f52901 (builtin/blame: highlight
> recently changed lines, 2018-04-23), which is when this feature was
> originally introduced.
>
> I looked at 25d5f52901 to see if there was any reason that we didn't at
> the time, but couldn't find anything.
>
> So this looks correct to me. I'm a little disappointed that some of
> your more detailed performance numbers from the cover letter didn't make
> it into the patch description, but it may not be worth belaboring the
> point further.
>
> Reviewed-by: Taylor Blau <me@ttaylorr.com>
>
Thanks for reviewing this patch.
I wasn't sure whether adding the performance number into the patch was a
good idea or not. After reading your message and the response from
Derrick and Junio, I'll definitely re-roll this patch adding those
information.
> Thanks,
> Taylor
--
Thanks
Rafael
next prev parent reply other threads:[~2021-02-16 22:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-16 16:31 [PATCH 0/1] blame: remove unnecessary use of get_commit_info() Rafael Silva
2021-02-16 16:31 ` [PATCH 1/1] " Rafael Silva
2021-02-16 17:10 ` Taylor Blau
2021-02-16 22:25 ` Rafael Silva [this message]
2021-02-16 18:35 ` [PATCH 0/1] " Derrick Stolee
2021-02-16 19:45 ` Junio C Hamano
2021-02-17 14:42 ` Rafael Silva
2021-02-17 14:54 ` [PATCH v2 " Rafael Silva
2021-02-17 14:54 ` [PATCH v2 1/1] " Rafael Silva
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gohp6kpn0z7j2b.fsf@cpm12071.fritz.box \
--to=rafaeloliveira.cs@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=me@ttaylorr.com \
--cc=stefanbeller@gmail.com \
--cc=stolee@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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).