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

Re: Inexplicably deteriorating performance of Git repositories on Windows

From
Johannes Sixt <j6t@kdbg.org>
Date
Nov 24, 2010, 22:06 UTC
Message-ID
<201011242306.17834.j6t@kdbg.org>
In-Reply-To
<AANLkTi=X724OJgUvG0Ggu3OwxyaJprr9CLL+t+x=MbTO@mail.gmail.com>
On Mittwoch, 24. November 2010, Dun Peal wrote:
Show 14 quoted lines
> So my theory is that there's a cache that on the "fast" machines
> aggressively caches the entire tree on a regular `git status` run. On
> such a machine, it's enough to run `git status` once, and after that
> initial cold run, the rest will be warm... until you reboot the
> machine, rinse, repeat.
>
> On a slow machine, however, cache isn't so aggressive. It might be
> write-oriented. So when you write out a whole new working tree, that
> tree gets cached as it is written. And for the remainder of the
> lifetime of that cache, you get the fully-cached performance you see
> on the "fast" machines. But then you reboot the machine, and lose the
> cache. And since the caching process isn't aggressive, any number of
> `git status` runs won't get you back to the fully cached state. You
> will only get that on a newly written working copy.

You can test this theory on a slow machine: You have cloned a repository, rebooted, and you are now at 14s per 'git status'. Now:

 $ git rm -r .
 $ git reset --hard

erases the worktree and writes it out again (do this only on a clean checkout!). Are you now at 5s per 'git status'?

-- Hannes
Previous: A Large Angry SCMNext: Dun Peal
Message 11 of 21 in “Inexplicably deteriorating performance of Git repositories on Windows”
  1. Dun PealNov 23, 2010
  2. Wilbert van DolleweerdNov 23, 2010
  3. Dun PealNov 23, 2010
  4. Wilbert van DolleweerdNov 23, 2010
  5. Stephen BashNov 23, 2010
  6. Dun PealNov 23, 2010
  7. Tay Ray ChuanNov 24, 2010
  8. Joshua JensenNov 24, 2010
  9. Dun PealNov 24, 2010
  10. A Large Angry SCMNov 24, 2010
  11. Johannes SixtNov 24, 2010
  12. Dun PealNov 24, 2010
  13. Martin LanghoffNov 23, 2010
  14. Dun PealNov 23, 2010
  15. Ferry HubertsNov 23, 2010
  16. Dun PealNov 23, 2010
  17. Andreas EricssonNov 24, 2010
  18. Dun PealNov 24, 2010
  19. Nguyen Thai Ngoc DuyNov 24, 2010
  20. Dun PealNov 24, 2010
  21. Robin RosenbergNov 28, 2010

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.