Philip Mak wrote:
>
> On Sat, 8 Sep 2001, Joshua Chamas wrote:
>
> > Can you show a trace in the error_log with Debug set to -3 ?
> > Make sure Time::HiRes is installed first. The first request
> > error_log set from an apache restart would be helpful to see.
>
> I have attached the error log.
>
> > It may be that upon global.asa compilation, other modules
> > get also loaded that were not use'd in startup.pl? We'll
> > see more with your trace.
>
> I just did a "egrep ^use *" on my Global directory; everything that my
> modules "use" is included in startup.pl.
>
The Apache::ASP StatINC functionality is taking some time on the
first request to register code ref, but less than a second.
This can be alleviated some by getting my latest dev copy,
which I will send you shortly, and setting StatINC while using
Apache::ASP->Loader(), so that the code registration is cached
for all processes in the parent. This had been broken in a
few ASP releases, but fixed my my dev 2.23.
The real weight seems to be in parsing the file & includes,
in particular I'm betting there there are lots of embedded
XMLSubs that are getting parsed from the look of your
log file. There are some things ( you & me ) to do here
1) I need your scripts, and see if I can't make the parsing faster
2) use DynamicIncludes, there is not point for all your includes
to get recompiled on a per script basis
3) Use Loader() to precompile your scripts & includes, which is
a huge win with DynamicIncludes even when you don't precompile
all your scripts, but make sure to load enough scripts to process
your core templates.
I could also consider creating a file based parse cache like some
of the other environments have, I have never thought it necessary
before, but if 1-3 don't do it, then this might be necessary.
>
> P.S. Is it right to put DBI->connect inside Script_OnStart, or should it
> go somewhere else?
>
Yep, I do this kind of thing all the time. I usually call it $Db
though to make it more ASPish :)
--Josh
_________________________________________________________________
Joshua Chamas Chamas Enterprises Inc.
NodeWorks Founder Huntington Beach, CA USA
http://www.nodeworks.com 1-714-625-4051
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]