Re: git-diff in a worktree is an order of magnitude slower?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 11, 2026, 17:43 UTC
- Message-ID
- <xmqqbjdhnfaf.fsf@gitster.g>
- In-Reply-To
- <20260611085526.GL2191159@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 5 quoted lines
> I guess the distinction goes back to c06ff4908b (Record ns-timestamps if > possible, but do not use it without USE_NSEC, 2009-03-04), which details > some reasons you might not want USE_NSEC. Feels like it ought to be a > run-time config, though, and maybe even something that gets auto-probed > by git-init.
I thought for a bit but didn't think of a clean way to auto-probe if a filesystem loses nanosecond-precision part of .st_Xtime when "metadata is flushed and later read back in" with reasonable overhead. I do not think we want to trigger system-wide sync and/or dropping of buffer cache ;-)
> Definitely not an area I have looked at much, though, nor thought hard > about. So there might be gotchas. :) > > -Peff