On Wed, Mar 13, 2013 at 6:21 AM, Karsten Blees <karsten.bl...@gmail.com> wrote: > Hmmm...I don't see how filesystem changes since last invocation can solve the > problem, or am I missing something? I think what you mean to say is that the > daemon should keep track of the filesystem *state* of the working copy, or > alternatively the deltas/changes to some known state (such as .git/index)?
I think git process can keep track of filesystem state (and save it down if necessary). But when git process is not running, system state changes and it cannot know about. The daemon helps filling this gap (and basically keeps git "running" (in a light form) throughout a development session). For example if we know only 5 files have changed since the last refresh, we only need to re-stat those 5. The same for untracked/ignored file checking, > I'm also still skeptical whether a daemon will improve overall performance. > In my understanding its essentially a filesystem cache in user-mode. The > difference to using the OS filesystem cache directly (via lstat/readdir) is > that we replace ~50k sys-calls with a single IPC call (i.e. the git <--> > fswatch daemon communication is less 'chatty'). However, the 'chattyness' is > still there between the fswatch daemon and the OS / inotify. I think it attempts to reduce unnecessary system calls, not eliminate them all. In the "5 changed files" above, a few IPC calls are done to retrieve the file list, then 5 lstat will be issued (by git, not the daemon) instead of thousands of them. >Consider 'git status; make; make clean; git status'...that's a *lot* of >changes to process for nothing (potentially slowing down make). Yeah. In my opinion, the daemon should realize that at some point accumulated changes are too much that it's not worth collecting anymore, and drop them all. Git will do it the normal/slow way. After that the daemon picks up again. We only optimize for the case when little changes are made in filesystem. > Then there's the issue of stale data in the cache. Modifying porcelain > commands that use 'git status --porcelain' to compile their changesets will > want 100% exact data. I'm not saying its not doable, but adding another > platform specific, caching daemon to the tool chain doesn't exactly simplify > things... > > But perhaps I'm too pessimistic (or just stigmatized by inherently slow and > out-of-date TGitCache/TSvnCache on Windows :-) Thanks. I didn't know about TGitCache. Will dig it up. Maybe we can learn something from it (or realize the daemon approach is futile after all). -- Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html