From: Rafael Silva <rafaeloliveira.cs@gmail.com>
To: git@vger.kernel.org
Cc: Derrick Stolee <stolee@gmail.com>, Taylor Blau <me@ttaylorr.com>,
Stefan Beller <stefanbeller@gmail.com>,
Junio C Hamano <gitster@pobox.com>,
Rafael Silva <rafaeloliveira.cs@gmail.com>
Subject: [PATCH v2 0/1] blame: remove unnecessary use of get_commit_info()
Date: Wed, 17 Feb 2021 15:54:42 +0100 [thread overview]
Message-ID: <20210217145443.36764-1-rafaeloliveira.cs@gmail.com> (raw)
In-Reply-To: <20210216163151.76307-1-rafaeloliveira.cs@gmail.com>
Thanks Taylor, Derrick and Junio for reviewing v1. I've updated the
patch's message to include one of the performance reports that was
previously only on the cover-letter as suggested.
Rafael Silva (1):
blame: remove unnecessary use of get_commit_info()
builtin/blame.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
Range-diff against v1:
1: e0c698370e ! 1: 4d70ce9545 blame: remove unnecessary use of get_commit_info()
@@ Commit message
structure and remove the internal call to get_commit_info() thus
cleaning up and optimizing the code path.
+ Enabling Git's trace2 API in order to record the execution time for
+ every call to determine_line_heat() function:
+
+ + trace2_region_enter("blame", "determine_line_heat", the_repository);
+ determine_line_heat(ent, &default_color);
+ + trace2_region_enter("blame", "determine_line_heat", the_repository);
+
+ Then, running `git blame` for "kernel/fork.c" in linux.git and summing
+ all the execution time for every call (around 1.3k calls) resulted in
+ 2.6x faster execution (best out 3):
+
+ git built from 328c109303 (The eighth batch, 2021-02-12) = 42ms
+ git built from 328c109303 + this change = 16ms
+
Signed-off-by: Rafael Silva <rafaeloliveira.cs@gmail.com>
## builtin/blame.c ##
--
2.30.1.850.g2d41e9e789
next prev parent reply other threads:[~2021-02-17 14:56 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
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 ` Rafael Silva [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210217145443.36764-1-rafaeloliveira.cs@gmail.com \
--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.
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).