From: Zoran V. <zv...@ar...> - 2006-02-07 08:07:31
|
Am 07.02.2006 um 05:34 schrieb Stephen Deasey: > > Can this be changed to: > > ns_section ns/server/$servername/tcl > ns_param betternamehere true > > It's clearly part of the Tcl configuration. As for the name, 'trace' > just seems too generic, which is why it clashes with existing usage > (ns_register_trace). > > Anyway, tracing is just the mechanism, not the purpose. What about > lazyloader, or tclondemand, or ...? Well, anything you wish. We can call it lazyloader, for example. > > >> This way all "things" loaded into an interp during startup >> will just be recorded in ttrace database. At new thread >> creation, a short bootstrap script will be installed >> instead of a full-blown (potentially very large) init >> script. This one overrides the Tcl unknown method and loads >> required "things" definitions on-demand. > > > Why is this off by default? This is robust, right? This is very robust for us as we have been using it for some years already. I have two other OACS sites (not ours) which uses it as well. It is per-default off because I did not want to throw some foreign code to you before you have the chance to test it. After everybody is satisfied we can scrap quite a bit from bin/init.tcl. > > How about some debug log statements, so that we can see that it's > working correctly. This is true. I will add this. > > Looks like some cut 'n paste cleanup is needed: The blurb at the top > of ttrace.tcl mentions licence.terms. You'll need to include the > license directly at the top of the file. nsv_*, ns_mutex etc. will > always be available as this is now embedded in NaviServer -- can you > remove the indirect calls ( ${store}set etc. ) ? Yes. The thing is also the part of the Tcl threading extension, hence I made it generic. I can remove those compat code as it will be easier to read. But, I did not want to introduce some errors before you get the chance to give it a try. Once blessed we can make all those things above and make it on per default. Cheers Zoran |