Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Perl startup and excessive "stat" use on module load

by haukex (Archbishop)
on Dec 31, 2020 at 11:31 UTC ( [id://11126036]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl startup and excessive "stat" use on module load
in thread Perl startup and excessive "stat" use on module load

If the extra directories have been compiled into your copy of perl itself then it's not so easy.

I think it's pretty easy - the perlbrew installs on my machine only have four entries in @INC, and building a copy of Perl without perlbrew is pretty easy too.

$ wget https://www.cpan.org/src/5.0/perl-5.32.0.tar.xz $ tar -xaf perl-5.32.0.tar.xz $ cd perl-5.32.0 $ sh Configure -de -Dprefix=/opt/perl5.32 $ make -j4 $ TEST_JOBS=4 make test_harness $ make install $ /opt/perl5.32/bin/perl -le 'print for @INC' /opt/perl5.32/lib/site_perl/5.32.0/x86_64-linux /opt/perl5.32/lib/site_perl/5.32.0 /opt/perl5.32/lib/5.32.0/x86_64-linux /opt/perl5.32/lib/5.32.0

Replies are listed 'Best First'.
Re^3: Perl startup and excessive "stat" use on module load
by Fletch (Bishop) on Dec 31, 2020 at 15:00 UTC

    It's not rocket science, Smithers; it's brain surgery! However when compared against (possibly) unsetting an environment variable though that's a little bit more effort.

    Slight snark aside though: yes that's certainly something OP should consider doing anyhoo if they're using the stock perl on their platform, @INC length issues not withstanding. If that also solves their stat overhead problem all the better.

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

      However when compared against (possibly) unsetting an environment variable though that's a little bit more effort

      You're right of course, if the extra @INC dirs are coming from PERL5LIB then a new build of Perl won't help with that, so best to try that first :-)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11126036]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-25 05:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found