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

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

From
JFJ. Bruce Fields <bfields@fieldses.org>
Date
Mar 10, 2008, 22:58 UTC
Message-ID
<20080310225821.GS13660@fieldses.org>
In-Reply-To
<20080310224318.GC8410@spearce.org>
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.
Previous: Shawn O. PearceNext: Jakub Narebski
Message 9 of 10 in “Mercurial's only true "plugin" extension: inotify... and can it be done in Git?”
  1. Jakub NarebskiMar 9, 2008
  2. Jakub NarebskiMar 10, 2008
  3. Andreas EricssonMar 11, 2008
  4. Junio C HamanoMar 11, 2008
  5. Andreas EricssonMar 11, 2008
  6. Jakub NarebskiMar 11, 2008
  7. Geert BoschMar 10, 2008
  8. Shawn O. PearceMar 10, 2008
  9. J. Bruce FieldsMar 10, 2008
  10. Jakub NarebskiMar 15, 2008

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.