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

Re: git performance

From
PHPeter Harris <git@peter.is-a-geek.org>
Date
Oct 22, 2008, 21:13 UTC
Message-ID
<eaa105840810221413m4d0ed51ejab28f66493a12a13@mail.gmail.com>
In-Reply-To
<20081022203624.GA4585@coredump.intra.peff.net>
On Wed, Oct 22, 2008 at 4:36 PM, Jeff King wrote:
Show 12 quoted lines
> On Wed, Oct 22, 2008 at 04:17:16PM -0400, Edward Ned Harvey wrote:
>
>> So - I didn't see anything out there saying "git is fast because it
>> uses inotify" or anything like that.  Perhaps git would not help me at
>> all?  Because git still needs to stat all the files in the tree?
>
> Yes, it does stat all the files. How many files are you talking about,
> and what platform?  From a warm cache on Linux, the 23,000 files kernel
> repo takes about a tenth of a second to stat all files for me (and this
> on a several year-old machine). And of course many operations don't
> require stat'ing at all (like looking at logs, or diffs that don't
> involve the working tree).

Windows is rather slower than Linux, so differences are more obvious. I find git feels "only" about 2x as fast as svn at status. svn has to stat all of its base files too, whereas git has the index. git pull (vs svn update) feels better than 2x faster, since git doesn't need to walk the tree and lock every sub-dir before it even connects to the remote server.

So we're not talking 'inotify' fast, but maybe half a cup of coffee instead of a full cup if you have that many files.

"git-svn" is really quite good. I recommend you try a quick (trunk and maybe one branch only, last few revisions only) import of your svn tree to test with.

Peter Harris
Previous: Jeff KingNext: Edward Ned Harvey
Message 3 of 22 in “git performance”
  1. Edward Ned HarveyOct 22, 2008
  2. Jeff KingOct 22, 2008
  3. Peter HarrisOct 22, 2008
  4. Edward Ned HarveyOct 22, 2008
  5. Andreas EricssonOct 23, 2008
  6. Andreas EricssonOct 23, 2008
  7. Andreas EricssonOct 23, 2008
  8. Matthieu MoyOct 23, 2008
  9. Jeff KingOct 23, 2008
  10. Daniel BarkalowOct 23, 2008
  11. Nanako ShiraishiOct 23, 2008
  12. Daniel BarkalowOct 24, 2008
  13. Pete HarlanOct 24, 2008
  14. Pete HarlanOct 24, 2008
  15. Jakub NarebskiOct 22, 2008
  16. Andreas EricssonOct 23, 2008
  17. Nguyen Thai Ngoc DuyOct 23, 2008
  18. Jeff KingOct 24, 2008
  19. George ShammasOct 24, 2008
  20. Jakub NarebskiOct 24, 2008
  21. Linus TorvaldsOct 24, 2008
  22. Jeff KingOct 24, 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.