http://www.perlmonks.org?node_id=207078

ruscoekm has asked for the wisdom of the Perl Monks concerning the following question:

Hi All. I have a fairly large Perl program (approx. 150 classes) and have been spending some time trying to speed it up (particularly startup time). I noticed from the output of strace -c that there were 600 stat64 calls, out of which 512 got ENOENT. Just about all of these failed stat64 calls were looking for foo.pmc (where foo corresponds to the name of a Perl module required by my program).

My Perl program is taking around 10secs to start up, of which 2-3 secs are spent in these stat64 calls.

Now, I am aware that PMC stands for Perl Magic Cookie in Perl6, but this is Perl5 :-) My next thought was that perhaps .pmc refers to a compiled version of a Perl module (that is, compiled with B::Bytecode). I could not find any documentation which verified this.

Does anybody know if Perl is indeed looking for compiled versions of required modules? If so, is there a way to disable this? Given that B::Bytecode is still experimental, it seems odd that this is the default behaviour. (Of course, I may have got entirely the wrong end of the stick :-)

Best wishes, Kevin