# HG changeset patch # User Robert McIntyre # Date 1319207002 25200 # Node ID a012d31df3807ca0d2a7b6cb03aa80a778749e82 # Parent b6e64e348e471a291707f0d1bff33b86a098f0be Made convert.pl work in parallel. Restored files in less than 2 minutes! diff -r b6e64e348e47 -r a012d31df380 .hgignore --- a/.hgignore Fri Oct 21 07:12:40 2011 -0700 +++ b/.hgignore Fri Oct 21 07:23:22 2011 -0700 @@ -2,3 +2,5 @@ build* test-files* + +output* diff -r b6e64e348e47 -r a012d31df380 convert.pl --- a/convert.pl Fri Oct 21 07:12:40 2011 -0700 +++ b/convert.pl Fri Oct 21 07:23:22 2011 -0700 @@ -277,14 +277,20 @@ FF.spc); +`mkdir ./output`; + for (0..$#targets){ - - $command = "./build/spc_convert -s 100" . " -i ./test-files/" . $sources[$_] . - " -o ./output/" . $targets[$_]; - print "$command\n"; - - `$command`; - + my $pid = fork(); + + if ($pid == 0) { + + $command = "./build/spc_convert -s 100" . " -i ./test-files/" . + $sources[$_] . " -o ./output/" . $targets[$_]; + print "$command\n"; + + `$command`; + exit(0); + } }