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

Re: [PATCH 4/4] fsmonitor: Delay updating state until after split index is merged

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 21, 2017, 02:06 UTC
Message-ID
<xmqq376dgsq4.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<7c6bfaef-d05a-4c06-5a53-4f7811c81aec@gmail.com>
Ben Peart <peartben@gmail.com> writes:
Show 8 quoted lines
>>> +	} else {
>>> +		trace_printf_key(&trace_fsmonitor, "fsmonitor not enabled");
>>> +	}
>>> +
>
> I'd remove the trace statement above as it isn't always
> accurate. fsmonitor could be enabled but just hasn't written/read the
> extension yet.

I agree; when it is not enabled, we shouldn't be paying the penalty, either. I wonder if tweak_*() function can return early upfront if we know fsmonitor is not enabled to make it even more obvious.

Show 8 quoted lines
>>> +	if (ignore_fsmonitor)
>>> +		trace_printf_key(&trace_fsmonitor, "Ignoring fsmonitor for %s", ce->name);
>>
>> This is the code path I am fairly certain should not be penalized if
>> tracing is disabled.
>
> Definitely agree with the need to remove this tracing as it will get
> called a lot and we don't want to pay the perf penalty.
Yes.
Previous: Ben PeartNext: Jeff King
Message 12 of 21 in “fsmonitor fixes”
  1. 0/4 fsmonitor fixesAlex Vandiver, Oct 20, 2017
  2. 2/4 fsmonitor: Don't bother pretty-printing JSON from watchmanAlex Vandiver, Oct 20, 2017
  3. Johannes SchindelinOct 20, 2017
  4. Ben PeartOct 20, 2017
  5. Alex VandiverOct 26, 2017
  6. Johannes SchindelinOct 27, 2017
  7. 3/4 fsmonitor: Document GIT_TRACE_FSMONITORAlex Vandiver, Oct 20, 2017
  8. Ben PeartOct 20, 2017
  9. 4/4 fsmonitor: Delay updating state until after split index is mergedAlex Vandiver, Oct 20, 2017
  10. Johannes SchindelinOct 20, 2017
  11. Ben PeartOct 20, 2017
  12. Junio C HamanoOct 21, 2017
  13. Jeff KingOct 21, 2017
  14. Johannes SchindelinOct 23, 2017
  15. Ben PeartOct 23, 2017
  16. Alex VandiverOct 26, 2017
  17. 1/4 fsmonitor: Watch, and ask about, the top of the repo, not the CWDAlex Vandiver, Oct 20, 2017
  18. Johannes SchindelinOct 20, 2017
  19. Alex VandiverOct 26, 2017
  20. Johannes SchindelinOct 27, 2017
  21. Johannes SchindelinOct 20, 2017

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.