[Catalyst] Slow Makefile.PL

Ovid publiustemp-catalyst at yahoo.com
Mon Mar 22 19:20:29 GMT 2010


Hi all,

I'm not sure what I did, but recently, my "perl Makefile.PL" run time dropped from 4 minutes down to about 40 seconds.  The latter still seems rather slow. A generic Makefile.PL on my box (generated with "catalyst.pl MyApp") takes about 1.5 seconds to run.

The slowdown appears to be when the Makefile.PL hits the "catalyst;" line.  Devel::NYTProf shows it's I/O slowing things down (sorry for the rubbish formatting):

Top 15 Subroutines — ordered by exclusive time
Calls P F Exclusive Time Inclusive Time Subroutine
2556 1 2 20.0s 20.0s File::Copy::CORE:sysread (opcode) 
1274 1 2 5.19s 5.19s File::Copy::CORE:syswrite (opcode) 
2636 3 2 1.87s 1.87s File::Copy::CORE:close (opcode) 
142 1 2 796ms 796ms Cwd::CORE:backtick (opcode) 
2708 2 2 781ms 781ms File::Copy::CORE:open (opcode) 
36 1 1 749ms 5.78s Module::AutoInstall::_load 
2844 3 2 463ms 463ms File::Copy::Recursive::CORE:chmod (opcode) 
26 2 2 303ms 303ms Module::Install::Admin::CORE:close (opcode) 
1 1 1 208ms 214ms MooseX::Types::BEGIN at 11 
1354 1 1 205ms 28.1s File::Copy::copy 
14 1 2 181ms 181ms DynaLoader::dl_load_file (xsub) 
72 2 1 172ms 236ms Module::Install::__ANON__[inc/Module/Install.pm:324] 
1 1 1 155ms 254ms Module::Install::Admin::Metadata::dump_meta 
28 1 1 155ms 2.52s Class::MOP::__ANON__[Class/MOP.pm:103] 
5706 6 2 153ms 153ms File::Copy::Recursive::CORE:stat (opcode) 

Does this look familiar to anyone?  You can see right away that File::Copy::CORE::sysread is taking 20 seconds.  Is a total runtime of 40 seconds a *normal* response time on running Makefile.PL?  This is a relatively new project and I'm often rebuilding from scratch. That extra 40 seconds seems like a lot.  This is perl 5.10.1 (OS X Snow Leopard) and there are currently only 36 .pm files in the lib/ directory.

Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog - http://blogs.perl.org/users/ovid/
Twitter - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6





More information about the Catalyst mailing list