On 1/15/10, Nirbheek Chauhan <nirbh...@gentoo.org> wrote: > > "git commit <dir>" and "git status <dir>" still do full tree lstat(). > > I can try to make a patch or two to reduce lstat() in such cases. > > > > > That would definitely compliment the --stat option to git diff et al, > making git more usable on repos with a huge no. of files. Now that I > think about it, why does git <command> <dir> need to do a full tree > stat at all? Doesn't the added specification of <dir> mean "I'm only > interested in this dir for this command, other stuff doesn't matter"?
Probably because the difference is too small to notice on smaller-size projects, or because people tend to do whole-tree operations so "git <command> <dir>"'s performance does not catch the developers' eyes. Anyway, stat()ing 80k files takes about 1 second on my machine, still tolerable. There is whole-tree open() in "git status" to check for untracked files, that contributes more on "git status" slowness. How long on average did a Git operation take on your tmpfs? -- Duy