git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC] On watchman support

From
Duy Nguyen <pclouds@gmail.com>
Date
Nov 18, 2014, 10:48 UTC
Message-ID
<CACsJy8BfxP7KF1XF29BOgC6XhO8iAy-ycEoLkDG5rn6TYH_DrA@mail.gmail.com>
In-Reply-To
<1416270336.13653.23.camel@leckie>
On Tue, Nov 18, 2014 at 7:25 AM, David Turner <dturner@twopensource.com> wrote:
Show 6 quoted lines
>> So we got a few options:
>>
>> 1) Convince watchman devs to add something to make it work
>
> Based on the thread on the watchman github it looks like this won't
> happen.

Yeah. I came to the conclusion that I needed an extra daemon. And because I would need an extra daemon anyway to speed up index read time, that one could be used for caching something else like watchman. It works out quite nice: because watchman is not tied to the main 'git' binary, people don't need libwatchman and libjansson by default. When people want watchman, they can install an extra package that includes the index-helper and its dependencies. This only matters for binary-based distros of course.

Show 7 quoted lines
>> Comments?
>
> I don't think it would be impossible to add Windows support to watchman;
> the necessary functions exist, although I don't know how well they work.
> My experience with watchman is that it is something of a stress test of
> a filesystem's notification layer.  It has exposed bugs in inotify, and
> caused system instability on OS X.

The way i'm adding watchman to index-helper should work on Windows as well, IPC is really simple. But let's wait and see.

Show 6 quoted lines
> My patches are not the world's most beautiful, but they do work.  I
> think some improvement might be possible by keeping info about tracked
> files in the index, and only storing the tree of ignored and untracked
> files separately.  But I have not thought this through fully.  In any
> case, making use of shared memory for the fs_cache (as some of your
> other patches do for the index) would definitely save time.

By the way, what happened to your sse optimization in refs.c? I see it's reverted but I didn't follow closely to know why. Or will you go with cityhash now.. I ask because you have another sse optimization for hashmap on your watchman branch and that could reduce init time for name-hash. Name-hash is used often on case-insensitive fs (less often on case-sensitive fs).

I did a simple test and your optimization could init name-hash (on webkit) in 35ms, while unmodified hashmap took 88ms. Loading index on this machine took 360ms for reference (probably down too 100ms with index-helper running, when that 88ms starts to become significant).

-- 
Duy
Previous: David TurnerNext: David Turner
Message 6 of 15 in “[RFC] On watchman support”
  1. Duy NguyenNov 11, 2014
  2. Torsten BögershausenNov 13, 2014
  3. Duy NguyenNov 13, 2014
  4. Torsten BögershausenNov 15, 2014
  5. David TurnerNov 18, 2014
  6. Duy NguyenNov 18, 2014
  7. David TurnerNov 18, 2014
  8. Junio C HamanoNov 18, 2014
  9. David TurnerNov 18, 2014
  10. Junio C HamanoNov 18, 2014
  11. Jeff KingNov 19, 2014
  12. Duy NguyenNov 28, 2014
  13. David TurnerDec 1, 2014
  14. Paolo CiarrocchiNov 19, 2014
  15. David TurnerNov 19, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.