Re: Serious performance regression in diff between 1.6.6 and 1.7.0
From: Brian Downing <hidden>
Date: 2016-06-15 22:48:57
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.
[...]
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