Subject: Re: Mercurial's only true "plugin" extension: inotify... and can it be done in Git?

From: "J. Bruce Fields" <[email-masked]>
Date: Mon, 10 Mar 2008 18:58:21 -0400

On Mon, Mar 10, 2008 at 06:43:18PM -0400, Shawn O. Pearce wrote:
> I think the reason Git has never had such an "extension" is we are
> just that freaking fast when it comes to comparing the working tree
> to the index.

NFS is an exception there; a git diff takes about 12 seconds for me.
It's easy to see why--ping time to the server is about a quarter of a
millisecond, so with some 24000 files to stat, and a roundtrip to the
server required for each, it would take at least 6 seconds even if there
was no other contribution to the stat latency.

But of course there's not much by way of file change notifications in
the current NFS protocol either, so that doesn't help.

At some point I tried patching git to do the stat's in parallel (the
totally lazy way--instead of modifying the existing code I just did an
extra parallel stat of everything first, then threw the results away, so
the real work would be done with a hot cache on the client).  I could
get it down to about 3.5 seconds that way, better though still annoying.

--b.