git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git blame vs git log --follow performance

From
Joe Perches <joe@perches.com>
Date
Jan 26, 2014, 21:10 UTC
Message-ID
<1390770652.20150.25.camel@joe-AO722>
Hi.

Is there something that can be done about improving git log --follow -- <file> performance to be nearly equivalent speed to git blame -- <file> ?

The overall cpu time taken for these 2 commands that track individual file history can be quite different.

	git log --follow -- <file>
and
	git blame -- <file>

It seems that there can be a couple orders of magnitude delta in the overall time taken.

For instance (using the Linus' linux kernel git):
$ time git log --follow -- drivers/firmware/google/Kconfig > /dev/null

real 0m42.329s user 0m40.984s sys 0m0.792s

$ time git blame -- drivers/firmware/google/Kconfig > /dev/null

real 0m0.963s user 0m0.860s sys 0m0.096s

This particular file has never been renamed.

Looking at the output on screen, there does seem to be 25+ seconds of cpu time consumed after the initial (last shown) commit that introduces this file.

Perhaps adding a whole-file rename option to the "git log" history simplification mechanism could help?

Thoughts?
Next: Duy Nguyen
Message 1 of 4 in “git blame vs git log --follow performance”
  1. Joe PerchesJan 26, 2014
  2. Duy NguyenJan 27, 2014
  3. Joe PerchesJan 27, 2014
  4. Duy NguyenJan 27, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.