summaryrefslogtreecommitdiff
path: root/Documentation/git-annotate.txt
diff options
context:
space:
mode:
authorLibravatar Shawn O. Pearce <spearce@spearce.org>2006-12-28 02:35:34 -0500
committerLibravatar Junio C Hamano <junkio@cox.net>2007-01-10 15:57:44 -0800
commitc82d7117a1f499b43e21e0a4589a080edadaf706 (patch)
treee67d86aa2ba26c96bf44bba637a8174657628a0c /Documentation/git-annotate.txt
parentProvide better feedback for the untracked only case in status output (diff)
downloadtgif-c82d7117a1f499b43e21e0a4589a080edadaf706.tar.xz
Improve merge performance by avoiding in-index merges.
In the early days of Git we performed a 3-way read-tree based merge before attempting any specific merge strategy, as our core merge strategies of merge-one-file and merge-recursive were slower script based programs which took far longer to execute. This was a good performance optimization in the past, as most merges were able to be handled strictly by `read-tree -m -u`. However now that merge-recursive is a C based program which performs a full 3-way read-tree before it starts running we need to pay the cost of the 3-way read-tree twice if we have to do any sort of file level merging. This slows down some classes of simple merges which `read-tree -m -u` could not handle but which merge-recursive does automatically. For a really trivial merge which can be handled entirely by `read-tree -m -u`, skipping the read-tree and just going directly into merge-recursive saves on average 50 ms on my PowerPC G4 system. May sound odd, but it does appear to be true. In a really simple merge which needs to use merge-recursive to handle a file that was modified on both branches, skipping the read-tree in git-merge saves on average almost 100 ms (on the same PowerPC G4) as we avoid doing some work twice. We only avoid `read-tree -m -u` if the only strategy to use is merge-recursive, as not all merge strategies perform as well as merge-recursive does. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Documentation/git-annotate.txt')
0 files changed, 0 insertions, 0 deletions