On Sun, 19 Sep 2004, Gunnar Hjalmarsson wrote:

> Btw, wonder how the autoloading affects that. I mean, when running 
> under mod_perl, you normally *want* everything to be loaded at the 
> start of the server, right?

Well, everything you're likely to use, yeah.

There doesn't seem to be much point in loading code that you never use.

> Is there any way to enforce that for a module that makes use of 
> autoloading? Or is there anything 'magic' in CGI.pm that disables 
> autoloading when run under mod_perl?
 
Well, you can run a startup script to load scripts & the modules they 
use when Apache is launched. That first hit may be slow, but that should 
be okay, because it's better than letting the first visitor have that 
slow hit. 

Here's a couple of articles discussing startup scripts & other 
techniques for speeding scripts up:

<http://www.perl.com/pub/a/2002/12/04/mod_perl.html>
<http://perl.apache.org/docs/1.0/guide/performance.html#Preloading_Registry_Scripts_at_Server_Startup>
 

And for a Apache 2 / mod_perl 1.99 overview:

<http://perl.apache.org/docs/2.0/user/intro/start_fast.html#Registry_Scripts>



-- 
Chris Devers

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to