Why a program ran with mod_perl runs slower?
From: Octavian Rasnita (orasnita_at_fcc.ro)
Date: 12/24/04
- Next message: Todd W: "Re: A very simple example program Comparing Perl, Python and Java"
- Previous message: Octavian Rasnita: "Script run time"
- Next in thread: Alfred Vahau: "Re: Why a program ran with mod_perl runs slower?"
- Maybe reply: Alfred Vahau: "Re: Why a program ran with mod_perl runs slower?"
- Reply: Robert: "Re: Why a program ran with mod_perl runs slower?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: <beginners@perl.org> Date: Fri, 24 Dec 2004 11:33:24 +0200
Hi all,
I have tried testing mod_perl with the following script:
my $begin = (times)[0];
print "Content-type: text/html\n\n";
sub fib {
$_[0] < 2 ? return $_[0] : return fib($_[0] - 1) + fib($_[0] - 2);
}
$f = fib(29);
my $end = (times)[0];
print($end - $begin);
-- Well, if I run this script as a common CGI application, it usually runs faster with 10% than if I run it using mod_perl. (Under Windows 2000, mod_perl 2 with Active Perl 5.8.4). I know that the advantage of mod_perl is that it doesn't require time for creating a new process and for the example above the time needed for starting the process is much lower than for running the entire program, but does this mean that mod_perl doesn't lose the time for starting a new process, but it executes the program slower? Or why does the program runs slower with mod_perl? I have also tried to put a: PerlRequire f:/web/presafierbinte/perl/benchmark.pl In the corresponding virtualhost section in httpd.conf, in order to preload this program at the server start, but it didn't change anything. Thank you. Teddy
- Next message: Todd W: "Re: A very simple example program Comparing Perl, Python and Java"
- Previous message: Octavian Rasnita: "Script run time"
- Next in thread: Alfred Vahau: "Re: Why a program ran with mod_perl runs slower?"
- Maybe reply: Alfred Vahau: "Re: Why a program ran with mod_perl runs slower?"
- Reply: Robert: "Re: Why a program ran with mod_perl runs slower?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|