On 8/28/07, Jeff King <peff@xxxxxxxx> wrote: > On Mon, Aug 27, 2007 at 11:54:30PM -0400, Shawn O. Pearce wrote: > > > This would be much faster if it was in Perl/Python/Tcl as the script > > could avoid two forks per file and instead just fork git-config > > once/twice and git-fast-import once. I think those two per-file > > forks is what is killing the performance. > > It's a bit faster, but you still get killed on passing all of the data > through userspace and a pipe, rather than just having git-add hash it > directly. > > Some timings importing git.git's contents: > > git-import-core > real 0m0.839s > user 0m0.504s > sys 0m0.304s > > git-import-shell > real 0m4.947s > user 0m2.604s > sys 0m2.912s > > git-import-perl > real 0m1.400s > user 0m1.144s > sys 0m0.180s > > where 'git-import-core' is this: > > #!/bin/sh > git-init > git-add . > git-commit -q -m "$1" Should the script contain git-repack -d as well? git-fast-import does not generate tons of objects. > > 'git-import-shell' is Duy's script, and 'git-import-perl' is the script > included below. I think having such a simple example in shell _and_ in > perl (and in python, etc) is a nice starting point for people who want > to hack together a fast-import frontend. I am queuing this to send to > Junio after 1.5.3, and I will submit the shell version, as well, if > Duy doesn't put it in patch format before then. Please do. I'm a lazy guy :-) -- Duy - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html