Re: [PATCH] Avoid running lstat(2) on the same cache entry.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Sun, 20 Jan 2008, Steffen Prohaska wrote:
> > 
> > fnmatch? It's certainly visible on Linux, I wonder if the Windows/OSX
> > version is more expensive due to trying to be case-insensitive or
> > something?
> 
> So roughly 50% of the running time is spent in getdirentries
> and fnmatch on the MacBook Pro I used to run these tests.

Ok. That seems to explain it (I have some trouble reading/comparing your 
profiles against mine, but yeah, fnmatch and getdirentries seem to be 
excessive from that "invert call tree" thing.

On Linux, the fnmatch and readdir overhead is way down in the noise both 
before and after the lstat removal. So removing the lstat's - which were 
fairly cheap, but there were _lots_ of them, made more of a relative 
difference on Linux.

I don't know what can be done about that on OS X. We really can't avoid 
reading the directory tree and matching it against ignore files. That's 
very integral for the status generation of "git commit", after all.

Maybe there are better fnmatch libraries for OS X? But getdirentries() was 
the bigger cost, and I don't see any alternative for that.

			Linus
-
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux