Re: inotify to minimize stat() calls

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

 



On Sun, Feb 10, 2013 at 11:45 PM, Ramkumar Ramachandra
<artagnon@xxxxxxxxx> wrote:
> So you're skipping the rest of refresh_cache_ent(), which contains our
> lstat() and returning immediately.  Instead of marking paths with the
> "assume unchanged" bit, as core.ignoreStat does, you're directly
> attacking the function that refreshes the index and bypassing the
> lstat() call.  How are they different?  read-cache.c:1030 checks
> ce->flags & CE_VALID (which is set in read-cache.c:88 if
> assume_unchanged) and bypasses the lstat() call anyway.  So why didn't
> you just set core.ignoreStat for your test?

It just did not occur to me that core.ignoreStat does the same.

> Ah, read_directory(), from the .gitignore/ exclude angle.  Yes,
> read_directory() seems to be the main culprit there, from my reading
> of Documentation/technical/api-directory-listing.txt.
>
> So, what did you do?  You short-circuited the function into never
> executing read_directory_recursive(), so the opendir() and readdir()
> are gone.  I'm confused about what this means: will new directories
> fail to appear as "untracked" now?

No, read_directory returns the list of untracked/ignored files.
Returning empty lists means no untracked nor ignored files.
-- 
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]