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

git performance after directory copy

From
GAGaer, A. <andreas.gaer@baslerweb.com>
Date
Sep 20, 2010, 09:20 UTC
Message-ID
<C5A8FDEFF7647F4C9CB927D7DEB307730F33B7C9@ahr075s.basler.corp>
Hello all,

while moving a project directory around I stumbled over an interesting phenomenon. On a copied source directory "git status" seems to be about 3 times slower than on the original directory. Only after a "git reset" both copies behave the same again. Is this connected to the timestamps of files & directories? Actually I would like to move the project directories of several software developers to a new partition and forcing them all to "git reset" in all of their repos is a little bit annoying. Any suggestions how to "repair" the repos less intrusive?

Here's how I measured. The trees reside on an ext3 FS. I have lots of free RAM, so after the first operation all further "git status" seem to run from FS cache in RAM.

$ git clone <path to your preferred kernel> $ cd kernel $ time git status # several times! ... $ time git status # On branch master nothing to commit (working directory clean)

real 0m0.691s user 0m0.256s sys 0m0.356s

$ cd .. $ rsync -a kernel/ kernel2/ $ cd kernel2 $ time git status # several times! ... $ time git status # On branch master nothing to commit (working directory clean)

real 0m2.705s user 0m1.724s sys 0m0.816s

$ git reset $ time git status # On branch master nothing to commit (working directory clean)

real 0m0.704s user 0m0.296s sys 0m0.348s

Regards,
 Andreas.
Next: Michael J Gruber
Message 1 of 8 in “git performance after directory copy”
  1. Gaer, A.Sep 20, 2010
  2. Michael J GruberSep 20, 2010
  3. Matthieu MoySep 20, 2010
  4. Michael J GruberSep 20, 2010
  5. AW: git performance after directory copyGaer, A., Sep 20, 2010
  6. Johannes SixtSep 20, 2010
  7. AW: git performance after directory copyGaer, A., Sep 20, 2010
  8. Matthieu MoySep 20, 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.