In every test I've ever seen, equivalent code runs slightly faster under mod_perl than PHP. Are you saying that you ran it under mod_perl and it wasn't much faster? That means you're either not really running it through mod_perl, or there is something slow about the way you wrote it in Perl. Show us your httpd.conf file and your code and we can help. | [reply] |
yes, in fact at this moment i'm use perl with mod_perl
look this, is a fragment of httpd.conf:
...
LoadModule perl_module modules/mod_perl.so
LoadModule php4_module c:/windows/php/sapi/php4apache2.dll
...
In the code of perl script load dbi,image magic,cgi,digest modules but i'm very sure, that both script haven't something bad, i'm check both code many times.
it's only perl that run slownly, or can't run faster.
maybe itsn't a problem just perl is slownly than php, can be?
Or must be faster than php.
anyone test that?
Thank for your help.
| [reply] |
That's not the part of your httpd.conf I wanted to see. Please post the part where you tell it to use Apache::Registry. You can verify that your script is running under mod_perl and not CGI by printing out the value of the environment variable $ENV{'MOD_PERL'}.
The CGI modules is not very fast, and not necessary when using mod_perl.
Perl is not slower than PHP. Here is one benchmark: http://www.chamas.com/bench/ There was also a Yahoo benchmark which showed mod_perl outperforming PHP. The numbers are always pretty close though.
| [reply] |