Zoran Vasiljevic wrote:
Am 26.05.2005 um 13:58 schrieb Andrew Piskorski:

Here's a naive, clueless-because-I-have-not-read-the-source question:
Is some sort of copy-on-write feasible, for the multi-threaded case?
Or would it even help, if it was possible?

I've taken a peek at the source, but as mentioned before, I'd have to
brush up on my TCL internals knowledge before I can do anything with it
- though it would be quite interesting so I may persue this as learning
project if nothing else.

If anyone else is interested, this seems to be where things got to:
http://cvs.sourceforge.net/viewcvs.py/tcl/tcl/generic/tclBasic.c?rev=1.27.6.8&view=markup

This piece alone is not the only obstacle.

The more important obstacle is: huge number of *things* affected by the
process (each and every procedure must be copied, each and every C-level
command, each and every global/namespaced variable, etc. etc.). Doing
this
on *each* request will just dwarf your CPU on any reasonable
production site.

For some people it may not be so much of an issue, but yes. Certainly it
would seem impossible not to take some performance hit vs the current
architeture. Though if your alternative was creating a new interpreter
from scratch on each request, it would be a win. Admittedly, people
already using AOLserver probably aren't doing that, so perhaps not a
useful argument.

Another important obstacle: copying commands is not enough since
packages
do have the freedom to do whatever they like, when loaded. If you
were to
*properly* address this, then you need to reload the package every time
you clone the interp. In which case you needn't copy it's commands...
Also, copying commands w/o copying their clientData properly is not
going to work.
This is how 3.x AS worked and it was plain wrong. Hence the 4.x has
completely
different (and more correct) approach.

This seems to be the killer sadly. For the things I work with, I get the
impression that they could be clone-safe... but I'm sure there are
plenty of others for whom this would be a showstopper. :)

Thanks

--
Stuart Children


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