Re: [PATCH] inotify to minimize stat() calls

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

 



On Fri, Apr 26, 2013 at 2:44 AM, Robert Zeh <robert.allan.zeh@xxxxxxxxx> wrote:
>> Can you just replace lstat/stat with cached_lstat/stat inside
>> git-compat-util.h and not touch all files at once? I think you may
>> need to deal with paths outside working directory. But because you're
>> using lookup table, that should be no problem.
>
> That's a good idea; but there are a few places where you want to call
> the uncached stat because calling the cache leads to recursion or
> you bump into things that haven't been setup yet.  Any ideas how to
> handle that?

On second thought, no my idea was stupid. We only need to optimize
lstat for certain cases and naming cached_lstat is much clearer. I
suspect read-cache.c and maybe dir.c and unpack-trees.c are the only
places that need cached_lstat. Other places should not issue many
lstats and we don't need to touch them.
--
Duy
--
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]