httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <do...@osf.org>
Subject Re: mod_perl_fast anyone?
Date Wed, 08 May 1996 23:43:03 GMT
On Wed, 8 May 1996, Rob Hartill wrote:

>  
> > Thanks to a kick start from someone I used to work with, I've made it to the
> > "future" section of mod_perl's readme.  When the server starts, a perl
> > script is picked up via a 'PerlScript' config directive, parsed and run.
> > So, the script should consist mostly of subroutines, along with use()'s and
> > require()'s for loading perl modules.  It may also include code you only
> > want to happen once, such as a opening a database connection.  
> > Then, a per_dir_config PerlResponseSub command tells the module which
> > subroutine to call for handling the request.  
> 
> Mmmm, sounds good. Here's how I'd like to be able to use such a beast
> (using some abstract syntax..)
> 
> PerlScript myperl1 /xxx/foo.pl
> PerlScript myperl2 /yyy/bar.pl
> 
> # this does the initialisation. 
> 
> <Location /cgi-bin/>
> PerlHandler myperl1
> </Location>
> 
> <Location /stuff/>
> PerlHandler myperl2
> </Location>
> 
> then a request for URL
>    my.server.com/cgi-bin/hello
> would call myperl1's  "hello" subroutine 
> 
>    my.server.com/stuff/world/weee
> would call myperl2's  "world" subroutine with PATHINFO set to "/weee"

Yes, this would be ideal.  I need to look closer at having multiple
interpreters hanging around the same place.  Although, myperl*'s could
simply be perl packages.

> 
> and if it can make coffee and wash my dishes it'd be even better.

In time, my friend, in time. 

> 
> > Here are some times, using perl's Benchmark module and libwww-perl as the
> >  
> > Benchmark: timing 1 iterations of cgi, embedded...
> >        cgi:  2 secs 
> >   embedded:  0 secs 
> 
> Oooo, zero time. You get bonus points if you can make it negative  ;-)

I'll keep trying! 8-)
The benchmark module is smart enough to warn you that there were "not
enough iterations for a reliable count".  But I left that out, the
difference between waiting less than a second and 3 seconds for a web
page to show up is rather big to me...

-Doug

>
> 
> Quite a difference. 
> > indeed.
> 
> 
> 
> rob




Mime
View raw message