Unexplained delay Module::Build + ExtUtils::MakeMaker building pureperl modules

Discussion in 'Perl Misc' started by Klaus, Aug 8, 2012.

  1. Klaus

    Klaus Guest

    On 12 nov, 15:44, Klaus <> wrote:
    > I am having a problem when building pure perl modules
    > on Windows 7, ActiveState Perl 5.12.3.
    >
    > The module build / test / install works correctly, but
    > my issue is that the build process for a very simple
    > pure perl module (Acme::SList::Utilities in this case)
    > takes about 60 seconds on my Windows machine. The
    > Build test and Build install process work rapidly
    > in about 2 seconds each.


    I have experimented with Strawberry Perl on Windows 7 (first a 'Build
    clean', then a 'Build') and I can report no delay in building a pure
    perl module (Acme::SList::Utilities, takes 2 seconds with Strawberry
    Perl on my Windows 7 machine).

    So I installed ActiveState Perl back on Windows 7, and, voila, after a
    'Build clean', followed by a 'Build', the build process is back to 60
    seconds.

    > C:\Acme-SList-Utilities-0.01>Build clean
    > Set up gcc environment - 3.4.5 (mingw-vista special r3)
    > Set up gcc environment - 3.4.5 (mingw-vista special r3)
    > Set up gcc environment - 3.4.5 (mingw-vista special r3)
    > Cleaning up build files
    >
    > Yes, a Build clean actually makes it go back to taking a
    > long time again.
    >
    > C:\Acme-SList-Utilities-0.01>Build --verbose
    > Set up gcc environment - 3.4.5 (mingw-vista special r3)
    > Set up gcc environment - 3.4.5 (mingw-vista special r3)
    > Set up gcc environment - 3.4.5 (mingw-vista special r3)
    > Building Acme-SList-Utilities
    > Copying lib\Acme\SList\Utilities.pm -> blib\lib\Acme
    > \SList\Utilities.pm
    > Manifying blib\lib/Acme/SList/Utilities.pm -> blib
    > \libdoc\Acme.SList.Utilities.3
    > Converting Pod to HTML with ActiveState::DocTools::pod
    > HTMLifying blib\lib\Acme\SList\Utilities.pm -> blib\
    > libhtml\site\lib\Acme\SList\Utilities.html
    >
    > ** It's actually the HTMLifying step which takes such a
    > long time.
    >
    > I suspect that the HTMLifying step of the Build actually
    > crawls the filesystem (or even worse, goes out on the
    > net to verify external links)


    To get to the bottom of this, I drilled into the ActiveState modules
    and I found that the following single call to Pod::Simple::Search in
    ActivePerl/DocTools/Pod.pm, subroutine pod2html() is the reason for
    the slowdown:

    >> ============================================
    >> unless (get_cache($Dircache, \@Podpath, $Podroot,
    >> $Recurse)) {
    >> # generate %Pages
    >> my $pwd = getcwd();
    >> chdir($Podroot) ||
    >> die "$0: error changing to directory ...";
    >>
    >> # find all pod modules/pages in podpath, store...
    >> # - callback used to remove Podroot and...
    >> # - laborious to allow '.' in dirnames (e.g., ...
    >>
    >> Pod::Simple::Search->new->inc(0)
    >> ->verbose($Verbose)
    >> ->laborious(1)->callback(\&_save_page)
    >> ->recurse($Recurse)->survey(@Podpath);
    >> ============================================


    This call (Pod::Simple::Search) consumes 58 seconds on my machine.
    It's purpose is to crawl all perl directories,
    identify *.pm files and populate an index of all modules with their
    respective location on disk. It is that index
    which later allows the podfile to replace the pod directive
    L<Mod::Name> by <a href="C:\Perl\scite\lib\Mod\Name.pm">.

    Let's say that I am not particularly interested in that feature which
    translates pod directives L<...> into <a href="...">. In this case, I
    can simply comment out the call to Pod::Simple::Search in ActivePerl/
    DocTools/Pod.pm.

    Now, even with ActiveState Perl, I am back to 2 seconds for a 'Build
    clean' + 'Build'. Of course, I have lost the
    fancy <a href="..."> for the L<...> constructions, but I consider this
    a small price to pay for the 58 seconds that
    I have gained with 'Build clean' + 'Build'.

    What is particularly interesting is that I now can use App::cpanminus,
    without that annoying delay of 58 seconds
    for each module to be installed.

    The question I have is as follows: The commenting out of the call to
    Pod::Simple::Search in ActivePerl/DocTools/Pod.pm works fine for my
    system, but I would like to have a more flexible solution (probably
    triggered by an environment variable $ENV{'ASPERL_INDEX'} = 'off') as
    follows:

    >> ============================================
    >> unless (get_cache($Dircache, \@Podpath, $Podroot,
    >> $Recurse)) {
    >> # generate %Pages
    >> my $pwd = getcwd();
    >> chdir($Podroot) ||
    >> die "$0: error changing to directory ...";
    >>
    >> # find all pod modules/pages in podpath, store...
    >> # - callback used to remove Podroot and...
    >> # - laborious to allow '.' in dirnames (e.g., ...
    >>
    >> unless (defined($ENV{'ASPERL_INDEX'})
    >> and $ENV{'ASPERL_INDEX'} eq 'off') {
    >> Pod::Simple::Search->new->inc(0)
    >> ->verbose($Verbose)
    >> ->laborious(1)->callback(\&_save_page)
    >> ->recurse($Recurse)->survey(@Podpath);
    >> }
    >> ============================================


    Do you think that this is a good solution ?

    Where can I speak to ActiveState to propose my changes to be
    incorporated into their development branch ?
    Klaus, Aug 8, 2012
    #1
    1. Advertising

  2. Klaus

    Klaus Guest

    Re: Unexplained delay Module::Build + ExtUtils::MakeMaker buildingpure perl modules

    On 8 août, 20:15, Klaus <> wrote:
    > On 12 nov, 15:44, Klaus <> wrote:
    > > ** It's actually the HTMLifying step which takes such a
    > > long time.

    >
    > > I suspect that the HTMLifying step of the Build actually
    > > crawls the filesystem (or even worse, goes out on the
    > > net to verify external links)

    >
    > To get to the bottom of this, I drilled into the ActiveState modules
    > and I found that the following single call to Pod::Simple::Search in
    > ActivePerl/DocTools/Pod.pm, subroutine pod2html() is the reason for
    > the slowdown:


    Sorry, my bad. The call to Pod::Simple::Search takes place in Pod/
    Html.pm and *not* in ActivePerl/DocTools/Pod.pm.

    > Let's say that I am not particularly interested in that feature which
    > translates pod directives L<...> into <a href="...">. In this case, I
    > can simply comment out the call to Pod::Simple::Search in ActivePerl/
    > DocTools/Pod.pm.


    Again, my bad, the call was commented out in Pod/Html.pm and *not* in
    ActivePerl/DocTools/Pod.pm.

    > Now, even with ActiveState Perl, I am back to 2 seconds for a 'Build
    > clean' + 'Build'. Of course, I have lost the
    > fancy <a href="..."> for the L<...> constructions, but I consider this
    > a small price to pay for the 58 seconds that
    > I have gained with 'Build clean' + 'Build'.
    >
    > What is particularly interesting is that I now can use App::cpanminus,
    > without that annoying delay of 58 seconds
    > for each module to be installed.
    >
    > The question I have is as follows: The commenting out of the call to
    > Pod::Simple::Search in ActivePerl/DocTools/Pod.pm works fine for my


    Again, my bad, the call was commented out in Pod/Html.pm and *not* in
    ActivePerl/DocTools/Pod.pm.

    > system, but I would like to have a more flexible solution (probably
    > triggered by an environment variable $ENV{'ASPERL_INDEX'} = 'off') as
    > follows:
    >
    > >> ============================================
    > >> unless (get_cache($Dircache, \@Podpath, $Podroot,
    > >> $Recurse)) {
    > >>    # generate %Pages
    > >>    my $pwd = getcwd();
    > >>    chdir($Podroot) ||
    > >>      die "$0: error changing to directory ...";

    >
    > >>    # find all pod modules/pages in podpath, store...
    > >>    # - callback used to remove Podroot and...
    > >>    # - laborious to allow '.' in dirnames (e.g., ...

    >
    > >>    unless (defined($ENV{'ASPERL_INDEX'})
    > >>    and $ENV{'ASPERL_INDEX'} eq 'off') {
    > >>        Pod::Simple::Search->new->inc(0)
    > >>          ->verbose($Verbose)
    > >>          ->laborious(1)->callback(\&_save_page)
    > >>          ->recurse($Recurse)->survey(@Podpath);
    > >>    }
    > >> ============================================

    >
    > Do you think that this is a good solution ?


    Answering my own question: I don't think this is a good solution.

    > Where can I speak to ActiveState to propose my changes to be
    > incorporated into their development branch ?


    Before I speak to ActiveState I will first investigate further.
    Klaus, Aug 8, 2012
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jill
    Replies:
    2
    Views:
    127
    James Willmore
    Jan 27, 2004
  2. felipe200112
    Replies:
    0
    Views:
    254
    felipe200112
    Apr 19, 2004
  3. Irving Kimura

    Anything better than ExtUtils::MakeMaker ?

    Irving Kimura, May 11, 2004, in forum: Perl Misc
    Replies:
    1
    Views:
    116
    Jon Ericson
    May 14, 2004
  4. Abdul-Wahid Paterson

    installing extra file through ExtUtils::MakeMaker

    Abdul-Wahid Paterson, Nov 8, 2004, in forum: Perl Misc
    Replies:
    1
    Views:
    177
    Anno Siegel
    Nov 9, 2004
  5. Klaus
    Replies:
    2
    Views:
    337
    Klaus
    Nov 12, 2011
Loading...

Share This Page