Re: Bottlenecks in git merge
From: Petr Baudis <hidden>
Date: 2016-06-15 22:42:17
Dear diary, on Wed, Feb 01, 2006 at 12:45:27AM CET, I got a letter where Linus Torvalds [off-list ref] said that...
It would be interesting to see how big the "resolve 850 files" part is vs the "check out 10k+ files" is.
See my other mail.
In particular, if the "resolve 850 files" is a noticeable portion of it, then the right thing to do may be to just re-write git-merge-one-file.sh in C. Right now, almost _all_ of the expense of that thing is just the shell interpreter startup. The actual actions it does are usually fairly cheap.
Nope. xpasky@machine[0:0]~/linux-2.6.git$ echo -e '#!/bin/sh\n/bin/true' >r && chmod a+x r xpasky@machine[0:0]~/linux-2.6.git$ time git-merge-index -o ./r -a real 0m3.827s user 0m1.788s sys 0m2.004s xpasky@machine[0:0]~/linux-2.6.git$ time git-merge-index -o ~/git-pb/git-merge-one-file -a [lots of "Removing"] real 1m21.773s user 0m30.806s sys 0m13.248s The costs are apparently in git-update-index, not in the shell. -- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ Of the 3 great composers Mozart tells us what it's like to be human, Beethoven tells us what it's like to be Beethoven and Bach tells us what it's like to be the universe. -- Douglas Adams