I'm very pleased to announce that Damon today committed the new
interpreter initialization script to the repository. Damon made a major
rewriting of the code I wrote in the last weeks and, accordingly to the
tests he carried out, the gain in performance is tremendous.
We had a brief mail exchange in which we shared our opinions on the new
core mod_rivet_ng code and the further developments this model gives
way. We want to share our thoughts hoping to receive your
First of all, what we are doing on mod_rivet_ng will probably push it
onto a divergent path from mod_rivet: We should try to provide
compatibility with Rivet 2.x at a high level and we shouldn't try to
maintain two mod_rivet core models (that would not coexist on a single
HTTP web server, forcing to adopt only one of them)
After a quick look at the new script I realized that other stuff now
done in Rivet_PerInterpInit (src/mod_rivet_ng/mod_rivet_common.c) could
be devolved to ::Rivet::init
Rivet_PerInterpInit carries out the following tasks
1 - Create the ::rivet namespace (it's done in rivet/init.tcl now)
2 - Place the rivet Tcl library path in front of the auto_path list.
Easy to do at Tcl level if for example ::rivet::inspect could return
this string, but ... ::rivet::inspect is available only after point 3 is
complete because it...
3 - ...Initializes the mod_rivet commands. This requires to change the
order of execution. It's OK still it makes me uneasy to do it at Tcl
level. OK...this is not something the programmer should do, it's up the
rivet developers, still I have to think up how to make it rock solid.
A possible solution is to handle ::rivet::inspect separately and
initialize it before the remaining commands are set up
4 - create an array 'server' with a few variables storing some
configuration variables. This array is provided for compatibility with
previous versions and I think it could be absorbed by extending
::rivet::inspect's functionalities
5 - the Tcl variables controlling the export/import mechanism are set
up for the benefit of ::Rivet::init. This will be dropped and the
::rivet namespace export/import will be controlled through the configuration
6 - Package 'Rivet' is required, implicitly calling ::Rivet::init.
This is the procedure that should bind most of the previous 5 tasks
More improvements in various procedures brought the impressive speed
up in the request processing.
In the case of error message format printed by the default error handler
at least one test (broken.test) will break now, but after all the test
has to follow the new code and needs to be changed
I'm sure Damon spotted other stuff that needs work
-- Massimo
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscr...@tcl.apache.org
For additional commands, e-mail: rivet-dev-h...@tcl.apache.org