{"thread":{"id":"42081","subject":"Re: [PATCH v5 03/15] index-helper: new daemon for caching index and related stuff","startedAt":"2016-04-20T00:31:08Z","lastAt":"2016-04-20T12:19:16Z","messageCount":3,"participants":["Duy Nguyen","David Turner","Johannes Schindelin"],"isPatch":true,"patchVersion":5,"patchTotal":15},"messages":[{"id":"283896","messageId":"CACsJy8D_4KFjz6HefvzmWw-6Qqg0uguq8MXL6kLY0oMyVhPS0w@mail.gmail.com","threadId":"42081","inReplyTo":null,"subject":"Re: [PATCH v5 03/15] index-helper: new daemon for caching index and related stuff","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2016-04-20T00:31:08Z","receivedAt":"2016-04-20T00:31:08Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Wed, Apr 20, 2016 at 6:27 AM, David Turner <dturner@twopensource.com> wrote:\n> Shared memory is done by storing files in a per-repository temporary\n> directory.  This is more portable than shm (which requires\n> posix-realtime and has various quirks on OS X).  It might even work on\n> Windows, although this has not been tested.\n\nThere's another option, but I'm not sure if it's too clever/tricky to\ndo. Anyway, on *nix we can send file descriptors over unix socket [2],\nthen mmap them back to access content. On Windows, it looks like\nDuplicateHandle [1] can do nearly the same thing. This keeps\neverything in memory and we don't have to worry about cleaning up\nshm-* files.\n\n[1] http://lackingrhoticity.blogspot.com/2015/05/passing-fds-handles-between-processes.html\n[2] http://www.normalesup.org/~george/comp/libancillary/\n-- \nDuy\n"},{"id":"283897","messageId":"1461113092.5540.147.camel@twopensource.com","threadId":"42081","inReplyTo":"CACsJy8D_4KFjz6HefvzmWw-6Qqg0uguq8MXL6kLY0oMyVhPS0w@mail.gmail.com","subject":"Re: [PATCH v5 03/15] index-helper: new daemon for caching index and related stuff","fromName":"David Turner","fromEmail":"dturner@twopensource.com","sentAt":"2016-04-20T00:44:52Z","receivedAt":"2016-04-20T00:44:52Z","isPatch":true,"sender":{"key":"novalis@novalis.org","avatar":"https://avatars.githubusercontent.com/u/77003?v=4"},"body":"On Wed, 2016-04-20 at 07:31 +0700, Duy Nguyen wrote:\n> On Wed, Apr 20, 2016 at 6:27 AM, David Turner <\n> dturner@twopensource.com> wrote:\n> > Shared memory is done by storing files in a per-repository\n> > temporary\n> > directory.  This is more portable than shm (which requires\n> > posix-realtime and has various quirks on OS X).  It might even work\n> > on\n> > Windows, although this has not been tested.\n> \n> There's another option, but I'm not sure if it's too clever/tricky to\n> do. Anyway, on *nix we can send file descriptors over unix socket\n> [2],\n> then mmap them back to access content. On Windows, it looks like\n> DuplicateHandle [1] can do nearly the same thing. This keeps\n> everything in memory and we don't have to worry about cleaning up\n> shm-* files.\n> \n> [1] http://lackingrhoticity.blogspot.com/2015/05/passing-fds-handles-\n> between-processes.html\n> [2] http://www.normalesup.org/~george/comp/libancillary/\n\nIt's possibly a bit simpler for the index, although more complex\noverall since we still need to write temp files for the watchman data.\n\nWill consider/try.\n"},{"id":"283928","messageId":"alpine.DEB.2.20.1604201418550.2826@virtualbox","threadId":"42081","inReplyTo":"CACsJy8D_4KFjz6HefvzmWw-6Qqg0uguq8MXL6kLY0oMyVhPS0w@mail.gmail.com","subject":"Re: [PATCH v5 03/15] index-helper: new daemon for caching index and related stuff","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-04-20T12:19:16Z","receivedAt":"2016-04-20T12:19:16Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Duy,\n\nOn Wed, 20 Apr 2016, Duy Nguyen wrote:\n\n> On Wed, Apr 20, 2016 at 6:27 AM, David Turner <dturner@twopensource.com> wrote:\n> > Shared memory is done by storing files in a per-repository temporary\n> > directory.  This is more portable than shm (which requires\n> > posix-realtime and has various quirks on OS X).  It might even work on\n> > Windows, although this has not been tested.\n> \n> There's another option, but I'm not sure if it's too clever/tricky to\n> do. Anyway, on *nix we can send file descriptors over unix socket [2],\n> then mmap them back to access content.\n\nThis sounds too clever to me ;-)\n\nCiao,\nDscho\n"}]}