Re: [QUESTION] mod_perl2 and selfmade Modules
reto wrote: Hi everyone, I just configured mod_perl on for my apache2 server on debian 4. I have a perl-script index.cgi which is handled by mod_perl, by: SetHandler perl-script PerlHandler Apache::Registry Options ExecCGI This script uses a Perl-Module in the same directory I wrote. This could be something simple as: package Test; sub test() { return "hello world"; } Now to the question: Will this module also gain speed the same way as the script which uses this module and is handled by mod_perl? The module will be preloaded just like your script, thus any speed up experienced by your script will also be experienced by the module. -- D. Hageman<[EMAIL PROTECTED]> Dracken Technology, Inc. http://www.dracken.com/
Re: [QUESTION] mod_perl2 and selfmade Modules
2007/10/5, D. Hageman <[EMAIL PROTECTED]>: > The module will be preloaded just like your script, thus any speed up > experienced by your script will also be experienced by the module. > Hi, If you don't preload it in startup.pl or with PerlModule directive in httpd.conf,I don't think registry scripts would be preloaded by apache defaultly.Yes when first request hit the cgi script,the script would be parsed and compiled and server that request,then it will be stored in apache child.Next time if requests are coming,the same cgi script won't be re-loaded and re-parsed.This was "load by needed",not preload. Hope I'm right.If not,please point it out.
Re: [QUESTION] mod_perl2 and selfmade Modules
Jeff Pang wrote: 2007/10/5, D. Hageman <[EMAIL PROTECTED]>: The module will be preloaded just like your script, thus any speed up experienced by your script will also be experienced by the module. Hi, If you don't preload it in startup.pl or with PerlModule directive in httpd.conf,I don't think registry scripts would be preloaded by apache defaultly.Yes when first request hit the cgi script,the script would be parsed and compiled and server that request,then it will be stored in apache child.Next time if requests are coming,the same cgi script won't be re-loaded and re-parsed.This was "load by needed",not preload. Hope I'm right.If not,please point it out. The devil is in the details. You are technically right. Let me adjust what I said. s/preloaded/cached/ -- D. Hageman<[EMAIL PROTECTED]> Dracken Technology, Inc. http://www.dracken.com/