I wrote znamespace.tcl which replaces _ns_getinit. It's efficient especially if most of your modules are to be bytecompiled. I noticed about 5% gain in speed when testing with ab.
You also might want to write a wrapper function tbcload::bceval to rename itself, load tbcload.so and call tbcload::bceval again :> This should work. And no, you probably cannot simply convert tbcload into nstbc.so - I tried, fought for 2 weeks with no result :( Bernd Eidenschink wrote: > Hi, > > I'm trying to find the correct place to load "libtbcload", the library to > load ".tbc" files along with three tbc files. > > Should I place load/source in /modules/tcl/namespace.tcl e.g. in > _ns_getinit? > This works, but I don't know if that's a good idea or if it is efficient; > and it is called after my modules are already loaded. > > If I write a file with "load libtbcload" and want all the other modules+tbc > files be sourced before _ns_getinit is called, the server starts but on the > first > request it breaks with the "called a copy of a compiled script" message. > > > Regards, > Bernd. > > > -- WK "UTF-8 has a certain purity in that it equally annoys every nation, and is nobody's default encoding." -- Andy Robinson
