Re: [PATCH v5 03/15] index-helper: new daemon for caching index and related stuff
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Apr 20, 2016, 12:31 UTC
- Message-ID
- <CACsJy8D7_MhzG0yYC-fWjBeqeceVj5aPo2-vYdBMdX6xaSVZrg@mail.gmail.com>
- In-Reply-To
- <alpine.DEB.2.20.1604201349590.2826@virtualbox>
On Wed, Apr 20, 2016 at 7:17 PM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 7 quoted lines
>> We keep this daemon's logic as thin as possible. The "brain" stays in >> git. So the daemon can read and validate stuff, but that's all it's >> allowed to do. It does not add/create new information. It doesn't even >> accept direct updates from git. > > I like this design. For now. Later, I really think we should add the > ability to update the index via the index-helper.
Later we do. For watchman, index-helper creates and shares a piece of information retrieved from watchman, which has to be combined back to the index by git process. But it's still not a _direct_ index update.
Show 5 quoted lines
> I am thinking about a > method similar to watchman where a separate process (that may use the > inotify syscall on Linux, or tap into the NTFS journal on Windows) tells > the index-helper specifically which paths to look at, so that nobody ever > has to look at any files that were not modified at all.
Am I missing something here? I thought watchman could already run on Windows. We benefit from watchman, which was originally written for Mercurial. If there's a better way to do inotify equivalent for Windows, is it possible to do it in watchman so Mercurial can benefit from it too?
On Wed, Apr 20, 2016 at 7:19 PM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 11 quoted lines
>> On Wed, Apr 20, 2016 at 6:27 AM, David Turner <dturner@twopensource.com> wrote: >> > Shared memory is done by storing files in a per-repository temporary >> > directory. This is more portable than shm (which requires >> > posix-realtime and has various quirks on OS X). It might even work on >> > Windows, although this has not been tested. >> >> There's another option, but I'm not sure if it's too clever/tricky to >> do. Anyway, on *nix we can send file descriptors over unix socket [2], >> then mmap them back to access content. > > This sounds too clever to me ;-)
Well. At least we have considered everything (that I'm aware of).
-- Duy