Perl Disable PMC

Posted by erickulcyk on 2017-06-21 19:35
Forums: ActivePerl discussion | OS: Windows


I am concerned about performance in our Perl applications. I see perl is probing a lot of pmc files that don't exist, which is causing for performance degradations (about 1.5 million probes on a small run). Is there any way we can disable the probes for the PMC files, or get a version of Activestate perl which has the option to disable them?


ActiveState Staff
Fri, 2017-06-23 12:39

The feature for loading .pmc files is core to Perl 5.

There isn't an ActivePerl Community Edition that disables it, and there won't be, because the feature has strong support in the community as a way to encourage Perl 6 compatible development. Disabling it has been vigorously discouraged.

The only way to disable the feature is through a flag set when the Perl binary is compiled.
(Enterprise Edition) if you're interested in a customized Perl interpreter.

There are ways to work around the impact.
- Never install Perl in a way that forces it to run over an NFS, SAMBA, or any other form of network mount. If you do, you multiply the delays exponentially.
- The search for .pmc versions of a module is triggered by the internal functions "use" and "require". Avoid writing code as modules, and implement as subroutines where possible. The difference can be startling.