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

Re: core.fsmonitor always perform rescans

From
Ben Peart <peartben@gmail.com>
Date
Apr 10, 2018, 14:34 UTC
Message-ID
<53251802-5c5e-6fd2-25d0-40d534e6bd6f@gmail.com>
In-Reply-To
<CANqewP332-+esYWDPBtPif==wnb4PiNd89R1qTZsuWZAFSV0ew@mail.gmail.com>
On 3/26/2018 12:41 AM, Tatsuyuki Ishi wrote:
Show 15 quoted lines
> Hello,
> 
> I'm facing issue with core.fsmonitor.
> 
> I'm currently using the provided watchman hook, but it doesn't seem to
> record the fact that it has queried the fsmonitor backend, and as a
> result the timestamp passed to the hook doesn't seem to change.
> 
> As it always pass a timestamp before watchman has crawled the
> directories, watchman will always return all files inside the
> directory. This happens everytime I run a git command, resulting in
> slowness.
> 
> Is the timestamp not being updated an intended behavior, or is this a bug?
> 

As a performance optimization, the fsmonitor code doesn't flag the index as dirty and force it to be written out with every command. Can you try performing a git operation (add, rm, commit, etc) that will write out an updated index and see if that fixes the issue you're seeing?

I'm considering adding a special case to force the index to be written out the first time fsmonitor is invoked and am interested to know if this would have avoided the issue you are seeing.

Thanks!
> Tatsuyuki Ishi
> 
Previous: Johannes SchindelinNext: Tatsuyuki Ishi
Message 3 of 4 in “core.fsmonitor always perform rescans”
  1. Tatsuyuki IshiMar 26, 2018
  2. Johannes SchindelinMar 30, 2018
  3. Ben PeartApr 10, 2018
  4. Tatsuyuki IshiApr 11, 2018

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.