git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git performance after directory copy
@ 2010-09-20  9:20 Gaer, A.
  2010-09-20  9:45 ` Michael J Gruber
  2010-09-20  9:56 ` Matthieu Moy
  0 siblings, 2 replies; 8+ messages in thread
From: Gaer, A. @ 2010-09-20  9:20 UTC (permalink / raw
  To: git

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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-09-20 14:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-20  9:20 git performance after directory copy Gaer, A.
2010-09-20  9:45 ` Michael J Gruber
2010-09-20  9:56 ` Matthieu Moy
2010-09-20 10:54   ` Michael J Gruber
2010-09-20 11:37   ` AW: " Gaer, A.
2010-09-20 11:48   ` Johannes Sixt
2010-09-20 11:53     ` AW: " Gaer, A.
2010-09-20 13:57     ` Matthieu Moy

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).