]> source.dussan.org Git - jgit.git/commit
blame: Revert common subtree elimination "optimization" 12/25612/3
authorShawn Pearce <spearce@spearce.org>
Sat, 26 Apr 2014 17:40:30 +0000 (10:40 -0700)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Mon, 19 May 2014 19:45:43 +0000 (15:45 -0400)
commit6d724dcd3355f09e3450e417cf173fcafaee9e08
tree3960b2d01016111e9d443f5e151f0cc0e61f6bc2
parenta5ee6fe904d6eb75a0edf6b3e93d7bfd733b78fe
blame: Revert common subtree elimination "optimization"

This partially reverts 6de12836d72fe4cba9afc297c8988c6fff851fa9.

Performing a TreeWalk over 2 trees to identify and skip unmodified
subtrees to pass all blame onto an ancestor appears to be a micro
optimization that works for a very limited number of files.  In the
general case the 2 tree walk is slowing down blame more than it helps
to speed it up.

I keep coming up with files in multiple repositories where 6de128 is
making things worse, not better, and only one example where it
actually improved performance, render_view_impl.cc in chromium
as described in the commit message.

Change-Id: Ic6d5fff22acb5ab6485614a07bdb388e8c336679
org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java
org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java