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

Re: Serious performance regression in diff between 1.6.6 and 1.7.0

From
Brian Downing <bdowning@lavos.net>
Date
Jun 10, 2010, 17:08 UTC
Message-ID
<20100610170804.GB2635@glaurung.lavos.net>
In-Reply-To
<20100610001005.GA2635@glaurung.lavos.net>
On Wed, Jun 09, 2010 at 07:10:05PM -0500, Brian Downing wrote:
> I've stumbled across a pretty serious performance regression in "git
> diff" for a large (187456 files checked out on HEAD) repository of mine.
[...]
Show 7 quoted lines
> It is more than 10x worse for my case here:
> 
> before 730f72840cc50c523fe4cdd796ea2d2fc4571a28:
> 0.30user 0.50system 0:00.81elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
> 
> 730f72840cc50c523fe4cdd796ea2d2fc4571a28:
> 5.58user 0.40system 0:05.98elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k

Here's a little more profiling information (from the bad case). I ran this a couple of times to see what oprofile said. Sorry about the lack of non-Git symbols:

CPU: Core 2, speed 2668 MHz (estimated)
Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (Unhalted core cycles) count 100000
samples  %        image name               app name                 symbol name
499255   62.8497  git-diff                 git-diff                 df_name_compare
110561   13.9182  git-diff                 git-diff                 do_compare_entry
54508     6.8619  no-vmlinux               git-diff                 (no symbols)
33741     4.2476  no-vmlinux               no-vmlinux               (no symbols)
23724     2.9865  git-diff                 git-diff                 ce_in_traverse_path
11767     1.4813  libcrypto.so.0.9.8       git-diff                 (no symbols)
10511     1.3232  git-diff                 git-diff                 find_cache_pos
I also ran this through callgrind to see how often the above were called:
        Calls  Symbol
  -----------  -------------------
      197,958  unpack_callback
      208,460  find_cache_pos
   37,308,336  ce_in_traverse_path
  156,950,469  do_compare_entry
  156,950,469  df_name_compare
Hope this helps.
-bcd
Previous: Brian DowningNext: Brian Downing
Message 2 of 6 in “Serious performance regression in diff between 1.6.6 and 1.7.0”
  1. Brian DowningJun 10, 2010
  2. Brian DowningJun 10, 2010
  3. Brian DowningJun 10, 2010
  4. Brian DowningJun 10, 2010
  5. unpack-trees: Make index lookahead less pessimalBrian Downing, Jun 11, 2010
  6. Junio C HamanoJun 11, 2010

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.