Re: newbie mod_perl efficiency



On 2005-07-18, AgentZK <agent_zk13@xxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxxxxxxxx
(try just my userid to email me)
AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom
see X- headers for PGP signature information

.



Relevant Pages

  • Re: Loading Modules with "require"
    ... If I can ask a stupid question: If the module is loaded only once with ... purpose. ... different scripts, load as many times as you need to, etc...... ...
    (comp.lang.perl.misc)
  • Re: PHP Dynamic Form Generator
    ... I'm currently reviewing a load of scripts to dynamically generate a form ... I have designed a registration form, and once registered and logged in ... I just wanted to ask everyone for any advice on this and which scripts you ... PHP Classes - Free ready to use OOP components written in PHP ...
    (php.general)
  • Re: do_execve() finding vmspace_destroyed set under load
    ... > #ifdef MAC ... the scripts get pretty unhappy when they're summarily ... so there is no process executable image to return ... you're only seeing the problem under load, ...
    (freebsd-current)
  • Re: inserting random photo with caption
    ... > carolyn wrote: ... >> I am looking for a script that can load a random photo or other graphic ... The trick is that I would also like it to load a related ... >> I have found lots of scripts that will load random photos, ...
    (alt.html)
  • Re: Deploying Common Lisp applications
    ... bit upsetting to see the same program in lisp run much faster in say perl, but because of the time it takes to load the fasl files compared to perl modules the overall loading and running takes several hundred times longer. ... It's a bit of a waste to have many small scripts each represented by their own 22M core. ...
    (comp.lang.lisp)