Benchmarking git-add vs git-ls-files+update-index (was: way to automatically add untracked files?)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Kastrup
Date: Sunday, August 5, 2007 - 3:33 am

David Kastrup <dak@gnu.org> writes:


dak@lola:/home/tmp/texlive$ git-init
Initialized empty Git repository in .git/
dak@lola:/home/tmp/texlive$ time git --work-tree=/usr/local/texlive/2007/texmf-dist add .

real    9m36.256s
user    2m2.408s
sys     0m25.874s
dak@lola:/home/tmp/texlive$ time git --work-tree=/usr/local/texlive/2007/texmf-dist add .

real    0m34.161s
user    0m0.448s
sys     0m2.212s

[So the rc4 fix seems to have made it.]

dak@lola:/home/tmp/texlive$ rm -rf .git;git-init
Initialized empty Git repository in .git/

dak@lola:/home/tmp/texlive$ time git --work-tree=/usr/local/texlive/2007/texmf-dist ls-files -z -m -o .|(cd /usr/local/texlive/2007/texmf-dist;git --git-dir=/home/tmp/texlive/.git update-index --add -z --stdin)

real    8m9.370s
user    2m1.172s
sys     0m25.138s
dak@lola:/home/tmp/texlive$ time git --work-tree=/usr/local/texlive/2007/texmf-dist ls-files -z -m -o .|(cd /usr/local/texlive/2007/texmf-dist;git --git-dir=/home/tmp/texlive/.git update-index --add -z --stdin)

real    6m4.447s
user    0m16.801s
sys     0m12.333s
dak@lola:/home/tmp/texlive$ 

[Hm.  Maybe "modified" files are not what I think they are?]

dak@lola:/home/tmp/texlive$ time git --work-tree=/usr/local/texlive/2007/texmf-dist ls-files -z -o .|(cd /usr/local/texlive/2007/texmf-dist;git --git-dir=/home/tmp/texlive/.git update-index --add -z --stdin)

real    6m0.120s
user    0m16.977s
sys     0m12.653s

[No, doesn't help.]

[Just for kicks, let's try getting the Linux scheduler out of our hair
in the initial case.]

dak@lola:/home/tmp/texlive$ time git --work-tree=/usr/local/texlive/2007/texmf-dist ls-files -z -m -o .|dd bs=8k|(cd /usr/local/texlive/2007/texmf-dist;git --git-dir=/home/tmp/texlive/.git update-index --add -z --stdin)
201+1 records in
201+1 records out
1650230 bytes (1.7 MB) copied, 513.125 seconds, 3.2 kB/s

real    8m45.088s
user    2m2.052s
sys     0m25.870s

[Hm, does more damage than it helps.]

So in summary: git-ls-files -m is apparently lacking the optimization
of git-add for unchanged inodes.  Bad.  Using it together with
git-update-index in the initial case saves some time over git-add, but
not breathtakingly so.  This is on a single core.

Most of the time is spent waiting for I/O.  Threaded execution should
supposedly help in having less waiting time, but at least in this
combination, the payoff does not seem overwhelming.

One should mention that the stuff I tested it on is actually sitting
on a reiserfs file system (though the repository is on ext3).

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
way to automatically add untracked files?, Miles Bader, (Sat Aug 4, 8:31 pm)
Re: way to automatically add untracked files?, Shawn O. Pearce, (Sat Aug 4, 8:58 pm)
Re: way to automatically add untracked files?, Miles Bader, (Sat Aug 4, 9:00 pm)
Re: way to automatically add untracked files?, Shawn O. Pearce, (Sat Aug 4, 9:13 pm)
Re: way to automatically add untracked files?, Junio C Hamano, (Sat Aug 4, 9:13 pm)
Re: way to automatically add untracked files?, Miles Bader, (Sat Aug 4, 9:22 pm)
Re: way to automatically add untracked files?, Junio C Hamano, (Sat Aug 4, 9:23 pm)
Re: way to automatically add untracked files?, Miles Bader, (Sat Aug 4, 9:30 pm)
Re: way to automatically add untracked files?, Junio C Hamano, (Sat Aug 4, 9:39 pm)
Re: way to automatically add untracked files?, Miles Bader, (Sat Aug 4, 9:53 pm)
Re: way to automatically add untracked files?, Linus Torvalds, (Sat Aug 4, 10:03 pm)
Re: way to automatically add untracked files?, Junio C Hamano, (Sat Aug 4, 10:04 pm)
Re: way to automatically add untracked files?, Junio C Hamano, (Sat Aug 4, 10:14 pm)
Re: way to automatically add untracked files?, Miles Bader, (Sat Aug 4, 10:17 pm)
Re: way to automatically add untracked files?, Johannes Schindelin, (Sat Aug 4, 10:23 pm)
Re: way to automatically add untracked files?, Miles Bader, (Sat Aug 4, 10:27 pm)
Re: way to automatically add untracked files?, David Kastrup, (Sun Aug 5, 12:32 am)
Re: way to automatically add untracked files?, Miles Bader, (Sun Aug 5, 12:34 am)
Benchmarking git-add vs git-ls-files+update-index (was: wa ..., David Kastrup, (Sun Aug 5, 3:33 am)
Re: way to automatically add untracked files?, Steffen Prohaska, (Sun Aug 5, 4:22 am)
Re: way to automatically add untracked files?, Johan Herland, (Sun Aug 5, 5:11 am)
Re: way to automatically add untracked files?, David Kastrup, (Sun Aug 5, 5:17 am)
Re: way to automatically add untracked files?, Theodore Tso, (Sun Aug 5, 9:11 am)
Re: way to automatically add untracked files?, Linus Torvalds, (Sun Aug 5, 10:04 am)
Re: way to automatically add untracked files?, Johan Herland, (Sun Aug 5, 12:16 pm)
Re: way to automatically add untracked files?, Steffen Prohaska, (Sun Aug 5, 1:04 pm)
Re: way to automatically add untracked files?, Miles Bader, (Sun Aug 5, 5:00 pm)
Re: way to automatically add untracked files?, Johannes Schindelin, (Sun Aug 5, 5:16 pm)
Re: way to automatically add untracked files?, Johannes Schindelin, (Sun Aug 5, 5:17 pm)
Re: way to automatically add untracked files?, Miles Bader, (Sun Aug 5, 8:09 pm)
Re: way to automatically add untracked files?, Johannes Schindelin, (Sun Aug 5, 8:21 pm)
Re: way to automatically add untracked files?, Miles Bader, (Sun Aug 5, 8:45 pm)
Re: way to automatically add untracked files?, Steffen Prohaska, (Sun Aug 5, 9:58 pm)
Re: way to automatically add untracked files?, Johan Herland, (Mon Aug 6, 12:46 am)
Re: way to automatically add untracked files?, Junio C Hamano, (Mon Aug 6, 1:45 am)
Re: way to automatically add untracked files?, Johannes Schindelin, (Mon Aug 6, 5:17 am)
Re: way to automatically add untracked files?, David Kastrup, (Mon Aug 6, 11:19 am)
Re: way to automatically add untracked files?, Miles Bader, (Mon Aug 6, 5:08 pm)