newbie mod_perl efficiency
am 18.07.2005 04:43:15 von AgentZK
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!
-AgentZK
Re: newbie mod_perl efficiency
am 18.07.2005 06:45:10 von Keith Keller
On 2005-07-18, AgentZK wrote:
> I'm a newbie, and this may be a stupid question, but I haven't been able
> to find clear help for this:
How much of a newbie are you? mod_perl is not for the faint
of heart.
> 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 :) ).
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.
--keith
--
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom
see X- headers for PGP signature information