Re: inotify to minimize stat() calls
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Feb 10, 2013, 05:24 UTC
- Message-ID
- <CACsJy8DeM5--WVXg3b65RxLBS7Jho-7KmcGwWk7B5uAx77yOEw@mail.gmail.com>
- In-Reply-To
- <CALkWK0=6_n4rf6AWci6J+uhGHpjTUmK7YFdVHuSJedN2zLWtMA@mail.gmail.com>
On Sun, Feb 10, 2013 at 12:10 AM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:
Show 11 quoted lines
> Finn notes in the commit message that it offers no speedup, because > .gitignore files in every directory still have to be read. I think > this is silly: we really should be caching .gitignore, and touching it > only when lstat() reports that the file has changed. > > ... > > Really, the elephant in the room right now seems to be .gitignore. > Until that is fixed, there is really no use of writing this inotify > daemon, no? Can someone enlighten me on how exactly .gitignore files > are processed?
.gitignore is a different issue. I think it's mainly used with read_directory/fill_directory to collect ignored files (or not-ignored files). And it's not always used (well, status and add does, but diff should not). I think wee need to measure how much mass lstat elimination gains us (especially on big repos) and how much .gitignore/.gitattributes caching does. I don't think .gitignore has such a big impact though. strace on git.git tells me "git status" issues about 2500 lstat calls, and just 740 open+getdents calls (on total 3800 syscalls). I will think if we can do something about .gitignore/.gitattributes.
-- Duy