Re: is mod_perl better for CGI application?
- From: Sherm Pendley <spamtrap@xxxxxxxxxxx>
- Date: Thu, 22 Mar 2007 16:41:30 -0400
"John" <john1949@xxxxxxxxx> writes:
We use Perl primarily to write our website. The site uses CGI.pm
extensively. So, every page begins my $x=param('x') etc and depending
on whether it is 'undef' will jump to some routine or other. Lots of forms.
Handling incoming parameters is a wash - it has to be done either way, as
well as with FastCGI (which another reply mentioned), and none of them is
notably faster than the others at doing it.
The "big win" for mod_perl or FastCGI is script startup time. With a CGI,
the server has to start a new perl instance, which then has to load and
compile your script and any modules it uses, before it can even begin to
parse any parameters. Also, if your script accesses a database, it needs
to establish a connection to the DB and log in.
With mod_perl or FastCGI, most of that per-hit overhead goes away. Your
script is compiled only once. It can connect to a DB once, and then re-use
that connection for every hit. Each hit then has about as much overhead as
a function call.
sherm--
--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
.
- References:
- is mod_perl better for CGI application?
- From: John
- is mod_perl better for CGI application?
- Prev by Date: Re: Server/Clients system
- Next by Date: Re: Perl Equivelent of C++ program
- Previous by thread: Re: is mod_perl better for CGI application?
- Next by thread: Problem with indirect variables
- Index(es):
Relevant Pages
|