Re: [PATCH 1/4] fsmonitor: use fsmonitor data in `git diff`
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 19, 2020, 17:23 UTC
- Message-ID
- <xmqqr1puuo35.fsf@gitster.c.googlers.com>
- In-Reply-To
- <20201018234344.GC4204@nand.local>
Taylor Blau <me@ttaylorr.com> writes:
Show 8 quoted lines
>> > There is some overhead to invoke the hook and talk to watchman, but >> > I'd expect that to be dwarfed by not having to issue O(# files) >> > syscalls. >> >> "invoke the hook"---is that a pipe+fork+exec, or something else that >> is far lighter-weight? > > The former; see 'fsmonitor.c:query_fsmonitor()'.
It brings us back to the "overhead of how many lstat(2) takes us closer to the overhead of a single pipe+fork+exec plus reading from the pipe", doesn't it?