Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Does module size matter under mod_perl?

by ikegami (Patriarch)
on Jul 05, 2014 at 19:46 UTC ( [id://1092397]=note: print w/replies, xml ) Need Help??


in reply to Re: Does module size matter under mod_perl?
in thread Does module size matter under mod_perl?

In mod_perl, you'd load the module once when the web server is loaded. How long it takes to load is completely unimportant.
  • Comment on Re^2: Does module size matter under mod_perl?

Replies are listed 'Best First'.
Re^3: Does module size matter under mod_perl?
by dsheroh (Monsignor) on Jul 06, 2014 at 11:32 UTC
    Yes, the difference is completely unimportant, if there's even a measurable difference at all. Which was my point.

      And you missed mine.

      You said it might take a small amount of time to load. Nothing is loaded.

      You said the file is read from disk. The file is not accessed.

      You said there is something to measure. There is nothing to measure as the module should already have been loaded when mod_perl was loaded, not when a request comes in.

      If any of what you said was true, then the difference would be measurable, and it could be sizeable.

        The file is not read from disk for each request, but it is read from disk on startup, even if "startup" only happens once a month. The OP said he was wondering if it could have "any performance impact" (emphasis mine). Startup performance is a subset of performance.

        More significantly, time to read the file from disk was simply the first thing that came to mind as something which could be affected by module size. At no time have I said (or intended to imply) that it was the only thing which could be affected. It was meant as an example of a difference, not an exhaustive list of all possible differences.

        Even if my example is wrong (which it may or may not be, depending on how broadly you consider "performance"), my point is unaffected: If micro-optimization actually matters for your application, then you're probably better off porting to C rather than worrying about how to squeeze an extra microsecond out of your Perl code.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-23 06:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found