Joe Schaefer wrote:
Trevor Phillips <[EMAIL PROTECTED]> writes:

[...]


On my main dev box, ab gives an average of 8.8secs for the mod_perl
run, and 7.2secs for the FastCGI run. The internal timer and printed
output reflects these results too.


How does the cgi/command-line version stack up? AFAICT your test isn't measuring any architectural differences between modperl and fastgci,
just how well the server's embedded perl interpreter performs relative to
perl itself. I wonder if compiling modperl as a DSO versus compiling it
statically might explain the performance lag.

I doubt that this makes any difference. I think what makes the difference is
the fact that the mod_perl handler is setup via .htaccess. Have you tried setting it in httpd.conf? Otherwise it's parsed on each request, no surprises that it's slower.


Also add:

PerlModule Thrash
PerlModule Apache::Request

to your httpd.conf to pre-compile the modules.

Moreover, your code loads Apache::Request, but doesn't use it.

Unrelated to the case, but related to performance in general:

eval "use Time::HiRes;";
if (!$@)
{
   $Thrash::UseTimeHiRes = 1;
}

is probably a bit faster as:

eval { require Time::HiRes };
if (!$@)
{
   $Thrash::UseTimeHiRes = 1;
}

and neater as:

use constant UseTimeHiRes => eval { require Time::HiRes };

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



Reply via email to