Marat Radchenko venit, vidit, dixit 23.08.2011 09:25: > $ time git show branch:file | diff -u - file > /dev/null > > real 0m0.003s > user 0m0.000s > sys 0m0.000s > > $ time git diff branch -- file > /dev/null > > real 0m31.442s > user 0m31.040s > sys 0m0.380s > > What does git diff do so it takes that much time? And is there any flag to git > diff so that it will work as fast as show + diff? I thought these two are > equivalent but from run time it is obvious that they aren't. > > gprof output: http://slonopotamus.org/git-diff/git-diff-branch.gprof.txt > Is that a very large tree or a very slow file system? >From the gprof output, it would appear that we compare a lot of cache entries (or rather: spent most time on...). Do we enumerate all differing files and only then limit diff output by path?? Michael -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html