From: Marat Radchenko Date: Tue, 23 Aug 2011 16:45:02 GMT Subject: Re: What's the difference between `git show branch:file | diff -u - file` vs `git diff branch file`? Message-ID: <1314117902.17151.2.camel@n900.home.ru> In-Reply-To: <4E53C89A.9000604@drmicha.warpmail.net> On вт 23 авг 2011 19:34:50 MSD, Michael J Gruber wrote: > Well, we have to read the full tree before diffing. I don't see why you need that. > But I can't > reproduce the extreme difference which you observed (0.003s vs. 30s) Well, I have an extreme repo (sadly, private) that has already shown several scalability issues in various parts of git code. Hope this thread will help to improve it. > In your case, do you have a lot of differing files besides the one you > are limitting to? 1. I'm diffing a single (and rather small, <50kb) text file 2. Diff is done between two branches (master and bugfix for a particular release) one of which (master) already has several thousands of commits after fork, so yes, whole tree diffs a lot. P.S. Fix for [1] might somewhat improve the situation but it still isn't clear to me why whole tree needs to be processed when specific path is given. Btw, it is 30s even with --no-renames. [1] http://git.661346.n2.nabble.com/git-diff-is-slow-patience-is-fast-td6667216.html