11.09.2015 14:18, Massimo Manghi пишет:
Interpreters will be created and initialized only when the first request
for a specific virtual host comes in
I doubt that to initialize an intrepreter when request comes is a good
solution.
I'm running a custom rivet child init script now which creates child
interpreter for a virtual host on the first request for this virtual
host, and loads Tcl code into this interpreter via "source".
It worked good enough for years.
After upgrade from Tcl8.5 + Itcl3 to Tcl8.6 + Itcl4 some Tcl source
files are loaded many times (>50) slower now. These are modules that
create hundreds (about 500) of Itcl objects. These objects describe
implemented report items: tables, columns, charts, etc.
As a possible workaround I'm looking for a way to pre-load my sources
before actual request comes now..
"source" times demo:
$ tclsh8.5
% package require nemoweb
1178 us source -encoding utf-8
/opt/ActiveTcl-8.5/lib/teapot/package/tcl/teapot/tcl8/8.2/cmdline-1.5.tm
[27252]
...
39897 us source /usr/local/lib/nemo/nemoweb.tcl [27252]
2.6b3
%
$ tclsh8.6
% package require nemoweb
1150 us source -encoding utf-8
/opt/ActiveTcl-8.6/lib/teapot/package/tcl/teapot/tcl8/8.2/cmdline-1.5.tm
[27512]
/..
2947621 us source /usr/local/lib/nemo/nemoweb.tcl [27512]
2.6b3
%
--
Best regards, Anton.
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscr...@tcl.apache.org
For additional commands, e-mail: rivet-dev-h...@tcl.apache.org