Thread (29 messages) flat view 29 messages, 7 authors, 2016-08-11

Re: Git performance on OS X

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2016-06-15 22:44:30


On Sun, 20 Apr 2008, Pieter de Bie wrote:
The number of lstats are cut down by your patch: 428761 vs. 338091. Funnily
enough, there is no significant difference in run-time:
It may be that the problem with OS X is a sucky pathname cache mechanism.

The trivial patch cut down the number of stat() calls by a fair amount, 
but the calls that got removed were all of the "do two 'lstat()' calls on 
the exact same pathname consecutively" type.

Maybe OS X has some very limited pathname caching that catches that, or 
even if not, it just ends up being very nice in the D$, so it's not a big 
deal. And then the real suckiness happens only with bigger workloads.

It may also be that the bulk of the OS X cost isn't in lstat() at all, but 
in the VM. That was true for some other OS X load.
Command                                            Mean     Std
git status .                                       13.970  1.298
/Users/pieter/projects/External/git/git-status .   13.759  0.321
This is the WebKit archive, right?

For me, doing a "time git status ." on the WebKit thing I just cloned from 
git://git.webkit.org/WebKit.git is much faster: 1.264s (and it goes down 
by maybe 5-10% with my lstat-avoidance patch).

Is there any system-level profiler for OS X to get a clue where that cost 
is, in case it's not the lstat() at all?

			Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help