From: Donald P. <d.g...@co...> - 2025-08-16 12:06:06
|
Interp creation establishes a new interpreter initialized with the complete built-in command set, and includes the task of finding and sourcing the init.tcl file of the script library. That’s a fine default. Ashok’s proposal preserves an illusion of that, with some commands not fully realized, but still functional. Lazy loading or autoloading have long been part of the Tcl baseline. This is just a shift of that implementation detail. I think it is worth pursuing an additional option. Give programmers the option to create an empty interpreter — one with no commands, no variables, and only the global namespace. This would be a “create and fill with what you want” to be offered alongside the existing “create the standard and hack away what you find useless or dangerous”. I *think* that option would create interpreters faster, but a working implementation would need to demonstrate that. > On Aug 16, 2025, at 1:59 AM, apnmbx-public--- via Tcl-Core <tcl...@li...> wrote: > > I’ve logged a RFE <https://core.tcl-lang.org/tcl/tktview/effa2e2346> to improve interp creation times by lazy loading oo. Obviously, this only benefits applications that do not use oo but I believe many, and quite possibly the majority, do not. (Most of mine do so sadly would not benefit ☹). There is an accompanying branch apn-oo-lazy-init as proof of concept. > > From my perspective, motivation comes from applications like web servers, where client isolation using separate interpreters would be both safer and more elegant than other approaches but suffers a significant performance loss. > > Looking for comments and opinions on the utility of improving interp creation times as well as the lazy implementation itself. > > /Ashok > > > > _______________________________________________ > Tcl-Core mailing list > Tcl...@li... <mailto:Tcl...@li...> > https://lists.sourceforge.net/lists/listinfo/tcl-core |