Andrew Piskorski wrote:
> On Fri, Feb 25, 2005 at 11:30:13AM -0500, Dossy Shiobara wrote:
> > Yes, if you want to enforce full clean-up by dumping the Tcl interp
> > after processing each request, you could set connsperthread == 1, but
> > then you'd lose the
>
> Yuck. Tcl interps are often (maybe always?) FAR from light
> weight, so destroying and re-creating them constantly simply
> in order to re-set a bit of state seems like massive overkill.
Eh? Tcl interpreters are pretty lightweight, in terms of cost
to create and kill. This is the timing on Windows with 8.4.9
on a P4/2.8:
(Tcl) 49 % time {interp delete [interp create a]} 100
3370 microseconds per iteration
And because no self-respecting server would run on anything less
than an AMD64 running unix/linux, those timings are:
% time {interp delete [interp create a]} 100
2756 microseconds per iteration
That is 3 milliseconds to create and delete the interpreter.
> When AOLserver initializes a new thread, how much of that
> time is spent in setting up the Tcl interp (and all its
> procs)? Am I correct in assuming that it is the vast majority?
Now this of course is something different. The init of the
thread, and the way AOLServer does it, is where you will find a
good chunk of time taken up.
Jeff Hobbs, The Tcl Guy
http://www.ActiveState.com/, a division of Sophos
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]>
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:
field of your email blank.