> -----Original Message-----
> From: Matt Sergeant [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 07, 2000 8:57 AM
> To: Geoffrey Young
> Cc: '[EMAIL PROTECTED]'
> Subject: RE: [ANNOUNCE] Apache::Dispatch-0.03
> 
> 
> On Mon, 7 Aug 2000, Geoffrey Young wrote:
> 
> > for anyone who is interested (apparently not many :) I ran 
> a quick "hello
> > world" LWP::Simple based benchmark using Apache::Registry (with
> > RegistryLoader), a normal PerlHandler, and Apache::Dispatch...
> > 
> > Benchmark: timing 5000 iterations of dispatch, handler, registry...
> >   dispatch: 108 wallclock secs (24.21 usr +  5.73 sys = 29.94 CPU) @
> > 167.00/s (n=5000)
> >    handler: 91 wallclock secs (22.88 usr +  5.71 sys = 
> 28.59 CPU) @ 174.89/s
> > (n=5000)
> >   registry: 98 wallclock secs (23.77 usr +  5.45 sys = 
> 29.22 CPU) @ 171.12/s
> > (n=5000)
> 
> Does Dispatch stat() the module on every hit? It might be useful to
> provide a switch to turn that off, if so.

here's the only strace fragment with stat calls (with PerlSendHeaders Off)

read(3, "GET /Dispatch/foo HTTP/1.0\r\nConn"..., 4096) = 854
rt_sigaction(SIGUSR1, {SIG_IGN}, {SIG_IGN}, 8) = 0
time(NULL)                              = 965653681
gettimeofday({965653681, 395188}, NULL) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RT_0], 8) = 0
stat("/usr/local/apache/spinnaker/Dispatch/foo", 0xbffff7cc) = -1 ENOENT (No
such file or directory)
stat("/usr/local/apache/spinnaker/Dispatch", 0xbffff7cc) = -1 ENOENT (No
such file or directory)
stat("/usr/local/apache/spinnaker", {st_mode=S_IFDIR|0755, st_size=1024,
...}) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [RT_0], 8) = 0
rt_sigaction(SIGALRM, NULL, {0x40099490, [], SA_INTERRUPT|0x4000000}, 8) = 0
dup2(15, 2)                             = 2

which I would guess is just apache doing apache translation things, right?  

After determining the proper class->method() by parsing the uri and making
some assumptions, Dispatch.pm calls class->can(method), which does magic
things, of which I know little about the inner workings...

I was interested in somehow trying to cache known methods to avoid
successive can() calls, but I wasn't quite sure how to go about that one
yet...

does that help?

--Geoff
> 
> -- 
> <Matt/>
> 
> Fastnet Software Ltd. High Performance Web Specialists
> Providing mod_perl, XML, Sybase and Oracle solutions
> Email for training and consultancy availability.
> http://sergeant.org | AxKit: http://axkit.org
> 

Reply via email to