Stas Bekman wrote:
Joe Schaefer wrote:

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.

Eh? How can that make a difference? Yes, I know that, between .htaccess vs httpd.conf vs FastCGI vs CGI there will be some small performance hit when accessing the URL. But that speed difference is irrelevant given the run time of the content generator. I'm not talking about a lightning-fast routine on a heavily hit server; I'm talking about a complex request whose time can be measured in whole seconds. In that scenario, .htaccess vs httpd.conf is irrelevant.


(And in my dev environment, both the FastCGI and mod_perl were being configured from .htaccess)

And on the topic of DSO vs Static, yes, I tested that today. The static mod_perl was marginally faster than the DSO mod_perl - but still nowhere near as fast as the FastCGI, CGI and command line versions.

Interestingly, I tried Thrash on the aforementioned anomaly: My Sun Box running Debian. I was wrong in saying the performance was the same for both versions - turns out the mod_perl version on THAT platform is slightly FASTER (but nowhere near the performance gap shown on the Intel platforms).

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

Oops. Kick-back from the original module I was cloning.
Again, though, that would only affect start-up time, which in this test, is marginal. Also, it would not affect the time shown by the internal time difference displayed.


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 };

Thanks for the syntax tips. I'll change my other code to use them. ^_^


--
. Trevor Phillips             -           http://jurai.murdoch.edu.au/ .
: Web Technical Administrator     -          [EMAIL PROTECTED] :
| IT Services                        -              Murdoch University |
 >--------------------------------------------------------------------<
| On nights such as this, evil deeds are done. And good deeds, of     /
| course. But mostly evil, on the whole.                             /
 \      -- (Terry Pratchett, Wyrd Sisters)                          /



Reply via email to