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

Re: Why is --pretty=format: so slow?

From
René Scharfe <rene.scharfe@lsrfire.ath.cx>
Date
Nov 4, 2007, 10:31 UTC
Message-ID
<472D9F6E.8070609@lsrfire.ath.cx>
In-Reply-To
<7vmytuvdvq.fsf@gitster.siamese.dyndns.org>
Junio C Hamano schrieb:
Show 12 quoted lines
> Paul Mackerras <paulus@samba.org> writes:
> 
>> Strace seems to indicate that git log is doing at least one sequence
>> of open, fstat64, fcntl64, getdents64 and close for each line of
>> output in the --pretty=format: cases, but not in the other cases.
> 
> I bet that is coming from doing find_unique_abbrev() to fill
> fields %h, %t and %p, even when the output format does not ask
> for any of them.
> 
> Dscho, can we stop calling find_unique_abbrev() unconditionally
> before being asked?

Incidentally, I'm finishing a patch series to add git-describe style placeholders. It needs such an optimization even more badly (and has it). Speeding up other slow placeholder expansions falls out quite naturally. Please wait just a few minutes..

René
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 5 in “Why is --pretty=format: so slow?”
  1. Paul MackerrasNov 4, 2007
  2. Junio C HamanoNov 4, 2007
  3. René ScharfeNov 4, 2007
  4. Junio C HamanoNov 4, 2007
  5. René ScharfeNov 4, 2007

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.