Re: Perl vs PHP speed?
- From: nospam@xxxxxxxxxxxxx (Jamie)
- Date: Fri, 03 Mar 2006 05:29:36 GMT
"Jan" <janoleolsen@xxxxxxxxxxx> mentions:
We expect about 570 new visitors every minute on our web page
containing a form, 17 of these will press a submit button to invoke the
PHP (alternatively CGI perl).
Would you expect the performance hit to noticeable at this volume, thus
we should consider a cgi-bin perl instead of PHP (parser is loaded).
Perl is after all never invoked unless submit is pressed.
We would also like to store the referrer in a cookie when someone
quicker (avoiding PHP parser)?
I'd say, if you have a choice go with perl but try to do it in a way
that works with mod_perl as well as regular perl.
There is Apache::Registry, my preference is to go the other way, design a thin
"cgi layer" that gives the script the minimal mod_perl methods needed for it to
run. (that way, if you ever really NEED performance going from cgi to mod_perl
is pretty easy AND you get to use the mod_perl methods directly instead of
an emulated cgi environment)
PHP has it's own problems. As someone who uses both, perl is a better
PHP is nice because it has a standard template model, it's slightly
faster then cgi, but, thats just because the interpreter is pre-loaded.
In your case, 17/minute isn't all that many. Even so, many modern unice's
have a "copy-on-write" strategy which is a lot like sharing an interpreter,
I've seen performance shoot up when a perl interpreter was preloaded
for some unrelated script. (your mileage may vary on this...)
If it absolutely must be cgi based, try to load as little of your script
as possible. Make use of things like AUTOLOAD and require. (the opposite
advice holds for mod_perl)
One of the reasons PHP is so popular is that it doesn't involve setting
file permissions. Under the hood... it's a nightmare of which server has
what installed and under which settings..
http://www.geniegate.com Custom web programming
guhzo_42@xxxxxxxxx (rot13) User Management Solutions
- Perl vs PHP speed?
- From: Jan
- Perl vs PHP speed?
- Prev by Date: Re: Native Cut&Paste on Win* and Mac?
- Next by Date: CPAN shell: automatic 'yes' answers?
- Previous by thread: Re: Perl vs PHP speed?
- Next by thread: Re: Perl vs PHP speed?