Jie Gao wrote:
>
> Registry scripts run slower according to the benchmark data here. Presuming
> both were preloaded at server startup, can anybody explain this slowness?
Slow is relative ... still a lot faster than vanilla cgi. But registry needs to
emulate a cgi-like environment before starting to work on the script itself (even
if it is preloaded) - there is extra overhead for providing a separate namespace,
etc. Inside of that environment, scripts can be pretty dirty - mod_perl-handlers
have to be written a lot cleaner than registry-cgi-scripts.
Quoting from http://perl.apache.org/dist/cgi_to_mod_perl.html:
> CGI lets you get away with sloppy programming, mod_perl does not. Why? CGI scripts
>have the lifetime of a single HTTP
> request as a separate process. When the request is over, the process goes away
>and everything is cleaned up for you, e.g.
> globals variables, open files, etc. Scripts running under mod_perl have a
>longer lifetime, over several request, different
> scripts may be in the same process. This means you must clean up after
>yourself. You've heard: always 'use strict' and
> -w!!!
>
> It's more important under mod_perl Perl than anywhere else, while it's not
>required, it strongly recommended, it will save
> you more time in the long run. And, of course, clean scripts will still run
>under CGI!
>
- Gerd.
begin:vcard
n:Kortemeyer;Gerd
tel;fax:(517) 432-2175
tel;work:(517) 432-5468
x-mozilla-html:FALSE
url:http://www.lite.msu.edu/kortemeyer/
org:LITE Lab;DSME MSU
version:2.1
email;internet:[EMAIL PROTECTED]
title:Instructional Technology Specialist
adr;quoted-printable:;;123 North Kedzie Labs=0D=0AMichigan State University;East Lansing;MI;48824;USA
fn:Gerd Kortemeyer
end:vcard
begin:vcard
n:Kortemeyer;Gerd
tel;fax:(517) 432-2175
tel;work:(517) 432-5468
x-mozilla-html:FALSE
url:http://www.lite.msu.edu/kortemeyer/
org:LITE Lab;DSME MSU
version:2.1
email;internet:[EMAIL PROTECTED]
title:Instructional Technology Specialist
adr;quoted-printable:;;123 North Kedzie Labs=0D=0AMichigan State University;East Lansing;MI;48824;USA
fn:Gerd Kortemeyer
end:vcard