Artifacts Associated With Ticket 62019f8aa9f5ec73
Ticket change [6d338c0252] (rid 243410) by sebres on 2025-07-22 16:48:56:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-wiki"
- comment initialized to:
Working on the fix for use-after-free bug, I noticed that there is performance penalty by creation (and/or deletion) of interp. Here is the comparison <b style="color:red">9.0 (-)</b> vs <b style="color:green">8.6 (+)</b>: <code><pre> % timerate {interp create i; interp delete i} 5000 <b style="color:red">- 3574.98 µs/# 1398 # 279.72 #/sec 4997.816 net-ms</b> <b style="color:green">+ 1756.77 µs/# 2846 # 569.23 #/sec 4999.777 net-ms</b> <br> # still worse it looks with safe interp: % timerate {interp create -safe i; interp delete i} 5000 <b style="color:red">- 1228.34 µs/# 4070 # 814.11 #/sec 4999.341 net-ms</b> <b style="color:green">+ 460.025 µs/# 10869 # 2173.8 #/sec 5000.009 net-ms</b> </pre></code> However 8.7 seems to have the same "bottleneck" (although a bit faster). I had a 9.x-based branch with lazy load of clock, OO and few other stuff... it is significantly faster, but anyway a bit slower than 8.6... Since I don't have time right now to profile it, but it looks significant, I let it here as a ticket. - foundin initialized to: "9.0+"
- is_private initialized to: "0"
- login: "sebres"
- priority initialized to: "5 Medium"
- private_contact initialized to: "50e9528765c18296566374b3fde2df942c394efd"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "sebres"
- subsystem initialized to: "38. Init - Library - Autoload"
- title initialized to:
Performance penalty by creation of interp compared to old versions
- type initialized to: "Bug"
Ticket change [ad6719d9b9] (rid 243426) by sebres on 2025-07-22 18:34:50:
- icomment:
[4318f0e945ce26ee] fixes a part of it (improves interpreter creation speed also in case if there is no zipfs tcl-library), so eliminating the costs of ca. 1200 µs/#. I'd let this ticket open till I found remaining extra costs and/or provide my lazy-loading stuff for clock/etc as ready solution for 9.x (however I guess we'd at least resume [../tips/doc/trunk/tip/689.md|TIP#689] and further <code>namespace unknown</code> improvements).
- login: "sebres"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [f63b9fa26d] (rid 243433) by oehhar on 2025-07-23 06:31:13:
- icomment:
Great ! And the source code change is documented, I appreciate ! Thanks for all, Harald
- login: "oehhar"
- mimetype: "text/plain"
- icomment:
Ticket change [ff19c49619] (rid 243488) by sebres on 2025-07-26 14:53:44:
- icomment:
Branch for lazy load of clock ([04742d889c]) illustrates the possible win of changeover for single namespace/ensemble to on-demand load, where the performance win is ca. 200 µs/#. The switch of further subsystems to lazy loading may reduce interpreter creation time to ca. 1000 µs/# what would be almost double as fast than current 8.6 (and tipple as fast than current 9.x). However, as already said, it'd expect at least [../tips/doc/trunk/tip/689.md|TIP#689 (namespace unknown)], and some of the subsystems also further improvements, that may help to load namespace on demand by any access (e. g. on variable or on namespace resolution).
- login: "sebres"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [34c4ce8663] (rid 244132) by apnadkarni on 2025-08-16 06:12:19:
- icomment:
For one proposed improvement see [5773c78e86](https://core.tcl-lang.org/tcl/tktview/5773c78e86)
- login: "apnadkarni"
- mimetype: "text/x-markdown"
- icomment:
Ticket change [b82cec7d1d] (rid 244511) by dkf on 2025-08-23 08:29:26:
- icomment:
TclOO was one of the contributors to this. I've cut about 25% of the time off of the whole interp create/delete cycle from making the initialisation script contain less (by moving pieces into C). There might be further places that can be improved.
- login: "dkf"
- mimetype: "text/x-markdown"
- icomment:
Ticket change [717bf2c910] (rid 252092) by apnadkarni on 2026-03-14 04:07:14:
- icomment:
Closing this while cleaning up bug reports as performance is now 2x even 8.6. Further improvements are always possible but that is a generic goal not specific to this ticket. Current trunk: ``` % timerate {interp create i; interp delete i} 5000 1066.21 µs/# 4689 # 937.90 #/sec 4999.442 net-ms ``` 9.0.2: ``` % timerate {interp create i; interp delete i} 5000 4725.25 µs/# 1057 # 211.63 #/sec 4994.590 net-ms ``` 8.6: ``` % timerate {interp create i; interp delete i} 5000 2153.04 µs/# 2322 # 464.46 #/sec 4999.364 net-ms ``` - login: "apnadkarni"
- mimetype: "text/plain"
- icomment:
Ticket change [0a3bd6f46a] (rid 252093) by apnadkarni on 2026-03-14 04:18:35:
- closedate changed to: "2461113.6795784724"
- closer changed to: "apnadkarni"
- login: "apnadkarni"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"