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

Re: question about: Facebook makes Mercurial faster than Git

From
Johan Herland <johan@herland.net>
Date
Mar 10, 2014, 12:10 UTC
Message-ID
<CALKQrgcfTKy0d_BGAZ-bSx5i-=MVEF-WuRfW6T3Q-YxvVSqY_A@mail.gmail.com>
In-Reply-To
<531DA519.8090509@gmx.net>
On Mon, Mar 10, 2014 at 12:42 PM, Dennis Luehring <dl.soluz@gmx.net> wrote:
Show 9 quoted lines
> Am 10.03.2014 12:28, schrieb demerphq:
>
>> I had the impression, and I would not be surprised if they had the
>> impression that the git development community is relatively
>> unconcerned about performance issues on larger repositories.
>
> so the question is if the git community is interested in beeing competive in
> such large scale scenarios - something what mercurial seems to be now out
> of the box

AFAIK, David Lang's comment is not far off the mark. Facebook has made a tool called Watchman (https://github.com/facebook/watchman) that watches your work tree (i.e. wrapping inotify on Linux) and triggers various commands when files within are changed (e.g. do an auto-build whenever a file in your project changes). Since this tool will discover when files change, they have adjusted Mercurial to discover changes by querying Watchman instead of stat-ing the entire work tree.

AFAICS, this is basically a tradeoff between the time it takes to stat your work tree and the overhead/administrivia of running a daemon to monitor the work tree. It seems Facebook has organized their code and infrastructure in a way that makes the latter approach worthwhile for them, and has contributed their solution back to Mercurial.

It should be possible to teach Git to do similar things, and IINM there are (and have previously been) several attempts to do similar things in Git, e.g.:

 - http://thread.gmane.org/gmane.comp.version-control.git/240339
 - http://thread.gmane.org/gmane.comp.version-control.git/217817

I haven't looked closely at these attempts (it is not my scratch to itch), and I don't know if/how they would work on top of Watchman, but in principle I don't see why Git shouldn't be able to leverage Watchman the same way Mercurial does.

...Johan
-- 
Johan Herland, <johan@herland.net>
www.herland.net
Previous: Dennis LuehringNext: Michael Haggerty
Message 9 of 12 in “question about: Facebook makes Mercurial faster than Git”
  1. Dennis LuehringMar 10, 2014
  2. David LangMar 10, 2014
  3. Ondřej BílkaMar 10, 2014
  4. David LangMar 10, 2014
  5. Martin LanghoffMar 10, 2014
  6. Ondřej BílkaMar 11, 2014
  7. demerphqMar 10, 2014
  8. Dennis LuehringMar 10, 2014
  9. Johan HerlandMar 10, 2014
  10. Michael HaggertyMar 10, 2014
  11. Karsten BleesMar 10, 2014
  12. Duy NguyenMar 14, 2014

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.