As threatened, I've generalized the command splitting code into
MM_Any->split_command.  Given a command and a set of arguments (for example,
pod2man and a list of pod & man pages) this produces a list of shell
commands going through the list of arguments in chunks small enough to fit
the max exec size of the current OS.

VMS is the worst case scenario at 256 characters max.  IRIX is one of the
lowest Unixen with a 20K max limit.  cmd.exe looks something like 32K.  Not
sure about command.com or MacPerl Toolserver.

Anyhow, the old pm_to_blib code (copying files from lib/ to blib) was doing
its own ad-hoc command splitting and assuming a worst-case scenario of 256
characters.  This resulted in a lot of individual shell calls to perl,
forking, exec'ing, loading and reloading perl and all the modules, nine for
MakeMaker, which made things a lot slower than they need to be.

Replacing it with split_command(), which can take advantage of Unix's long
exec length, it reduces to one command, and better formatted, too! :)
Because we're not constantly forking, execing, loading and reloading Perl
this results in a speed up of 3x for make pm_to_blib (5 seconds down to 1.7
seconds) with the speed up likely getting better and better the larger the
module.

The new pod2man code, which uses a single call to Pod::Man rather than
calling pod2man for each individual man page, gives us a speed up of about
2x (25 seconds down to 12 seconds) when running manifypods.

Combined this means 'make' will run a lot faster.  And with split_command()
in place, a lot of the special VMS code will go away, plus the bioperl
large file set on IRIX problem can be easily solved without a lot of nasty
code.

Well whadya know, this refactoring stuff really works! ;)


Still need to propagate split_command() to other points in MakeMaker.
Coming along nicely.  Last thing feature/fix before 6.06.


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl Quality Assurance      <[EMAIL PROTECTED]>         Kwalitee Is Job One
What about MY need to be generalized and easily dismissed?
        http://www.goats.com/archive/000221.html

Reply via email to