Am 01.08.2007 um 09:57 schrieb Neophytos Demetriou:

>  I would prefer mostly if NS was distributed with an alternative
> init.tcl (based on the 4.99.1) so that it works for all of us. We  
> would
> then just change the initfile parameter.

Ah... as I said, the interp inits are really ugly.

The 4.0 AS and 4.99.1 NS both use a crude and ugly
introspective script that runs against a initialized
interp and pull-out definitions of procedures, variables
and namespaces found there. All is stuffed in a large
"init" script and this script is applied to every new
Tcl interpreter. Idea was to improve the speed of interp
initialization. That was perhaps necessary 7 years ago
but I believe today it is of less importance.

This is UGLY.

I have modified that to use command traces and build the
script "on-the-fly" as the first Tcl interp is being initialized
but this obviously has some side effects, who knows where
(as this works very fine for us, strangely). I would not go
in much detail there as I think that even that is a UGLY
solution (rather complicated and error-prone, although with some
nice side-effects regarding memory footprints...).

The real solution is to use [ns_ictl trace]. I promised to do
that some time ago but I'm lagging behind... (eh, work, work)
We need to rewrite the Tcl startup so that for every Tcl module
file that gets sourced in the startup interpreter we do something
like:

    ns_ictl trace allocate [list source module-file]

where the module-file is the file containing Tcl code to initialize
the interpreter. All of this is pulled from bin/init.tcl or wherever
you setup your virtual-server init script to be.

I cannot promise but I may try to see if this will work OK for you.
Unfortunately I can't make that before this weekend.

Cheers
Zoran








-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to