newbie mod_perl efficiency

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Hello All,

I'm a newbie, and this may be a stupid question, but I haven't been able
to find clear help for this:

Building a CGI-based site with multiple distinct sections (and running
under mod_perl), is it more efficient to load one giant CGI script into
memory, or to create separate scripts for each section of the page (and
have each separate script load the same modules)?  In the second case,
I'm not sure if mod_perl would be smart enough to load each "used"
module only once, or if it would be loaded once per call (or more
candidly, I assume it is, but I'd really hate to be wrong, so I'd like
to doublecheck to satisfy my paranoia :) ).

Thanks again!


Re: newbie mod_perl efficiency

Quoted text here. Click to load it

How much of a newbie are you?  mod_perl is not for the faint
of heart.

Quoted text here. Click to load it

mod_perl 1 loads each module once per httpd process as needed.  So
if by some coincidence one httpd process never handled one of your
CGI scripts, it would never load any of the modules specific to
those scripts (unless you asked it to in httpd.conf or equivalent).

You might want to try the mod_perl mailing list, where a lot of
the mod_perl experts subscribe and answer questions.


(try just my userid to email me)
see X- headers for PGP signature information

Site Timeline