On 8/9/07, Junio C Hamano <gitster@xxxxxxxxx> wrote: > Mark Levedahl <mlevedahl@xxxxxxxxx> writes: > > > Junio C Hamano wrote: > > Actually, there is another bug nearby. > Curious... I did a long time ago get git-bundle.sh to write out the format Dscho finally implemented working in Linux and Cygwin. With your latest patch, both produce identical bundles for a number of cases, but the timing is very curious: *builtin* git>time git-bundle create foo refs/tags/v1.0.3 Generating pack... Done counting 12288 objects. Deltifying 12288 objects... 100% (12288/12288) done Writing 12288 objects... 100% (12288/12288) done Total 12288 (delta 8435), reused 11542 (delta 7961) real 0m41.953s user 0m5.060s sys 0m39.685s *shell script* git>time git-bundle2 create foo2 refs/tags/v1.0.3 Generating pack... Done counting 12288 objects. Deltifying 12288 objects... 100% (12288/12288) done Total 12288 (delta 8435), reused 11542 (delta 7961) Created foo2 real 0m2.453s user 0m1.842s sys 0m1.190s git>diff foo foo2 git> Since when is shell 20 times faster than a builtin? Ok, those results are on Cygwin. On Linux, I get 1.21 sec for the builtin vs 0.933 for the shell script. Not as dramatic, but the script is still faster. So, I think this qualifies as a bug. I'm attaching the script (for info only, I'm not suggesting to replace the builtin), as I can't usefully put it inline from gmail. The timing difference seem to be in the rev walking (by eyeball, packfile generation time is the same), so something the shell script is doing to get the rev list is obviously more efficient than how the builtin works for this case. Mark
Attachment:
git-bundle2
Description: Binary data