On Fri, Feb 25, 2005 at 11:30:13AM -0500, Dossy Shiobara wrote:

> So, we DO clean up channels, and Tcl global variables in the top-level
> ("::") namespace, but not namespace variables -- those tend to be used
> differently than Tcl globals, so they generally DO need to persist
> between connections within an interp.

Why?  Why would ever you want namespace vars to persist in the Tcl
interp for that one particular thread?  As opposed to merely
tolerating such persistence?

> 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.

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?

It is easy to demonstrate that repeatedly destroying and re-creating
AOLserver conn threads absolutely hoses OpenACS performance.  However,
much of that is probably because OpenACS does various sorts of caching
PREDICATED on the assumption that threads and Tcl interps stick around
for a long time.  E.g., templating system Tcl/ADP pairs are compiled
to Tcl code, and stored per-thread.

--
Andrew Piskorski <[EMAIL PROTECTED]>
http://www.piskorski.com/


--
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.

Reply via email to