Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

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

by shmem (Chancellor)
on Dec 31, 2020 at 15:36 UTC ( [id://11126049]=note: print w/replies, xml ) Need Help??


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

We use a lot of real time perl scripting in an envoronment with high IOPS. Accumulated load time lag becomes noticeable.

What is the amount of time needed for the stat syscalls compared to the time needed for reading and compiling a single module file? I would answer that question first. To me, without having proof, it looks like micro-optimization at the wrong place. Making stuff resident in memory to avoid startup overhead and/or have persistent processes is imho a better optimization. Of course, depends on what you are doing.

Another way to avoid overhead is e.g. App::FatPacker - lump all together and you have a single file to stat, and btw avoid all those open/close syscalls.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (1)
As of 2024-04-25 19:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found