[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: does begin block effect any performance in modperl


On Mon, 15 Jan 2007 10:29:01 +0800 (GMT+08:00)
Jeff Pang <suppressed> wrote:

> 
> >> 
> >> I mean anything relative to the performance.is the begin block
> >> called everytime orjust the first time and is it safe to define a
> >> function in a file and call it with this method rather than a
> >> package , 
> >
> >The begin blocks are only run at compile time, so won't affect the
> >performance of future requests.
> >
> 
> If you require those scripts from more than one main-script under
> mod_perl,then it should affect the performance. Because each
> main-script load those scripts independently,then there are
> multi-copies of those scripts in each apache's process space,it
> distinctly waste the memory. It's good to define the scripts needed
> to be loaded as  classes and access their methods by OO way.

   Or non-OO, the OO-ness of the package doesn't have anything
   really to do with the memory consumption. 

 ---------------------------------
   Frank Wiles <suppressed>
   http://www.wiles.org
 ---------------------------------


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.