Re: [PATCH 01/02/RFC] implement a stat cache
On Sun, Apr 20, 2008 at 12:13:46PM +0100, Luciano Rocha wrote:
Show 14 quoted lines
> An implementation of stat(2) and lstat(2) caching. Both the return code
> and returned information are cached.
>
> Signed-off-by: Luciano Rocha <strange@nsk.no-ip.org>
> ---
> On Sat, Apr 19, 2008 at 03:39:37PM -0700, Linus Torvalds wrote:
> > Yeah. I didn't look any further, but we do a total of *nine* 'lstat()'
> > calls for each file we know about that is dirty, and *seven* when they are
> > clean. Plus maybe a few more.
>
> That's a lot. Why not use a stat cache?
>
> With these changes, my git status . in WebKit changes from 28.215s to
> 15.414s.
git status . in git changes from 0.477s to 0.412s.
All tests under OS X.
--
Luciano Rocha <luciano@eurotux.com>
Eurotux Informática, S.A. <http://www.eurotux.com/>