Skip to content
Tcl Source Code History Of Ticket 62019f8aa9f5ec73
Login

History Of Ticket 62019f8aa9f5ec73

Artifacts Associated With Ticket 62019f8aa9f5ec73

  1. Ticket change [6d338c0252] (rid 243410) by sebres on 2025-07-22 16:48:56:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. 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.
      
    5. foundin initialized to: "9.0+"
    6. is_private initialized to: "0"
    7. login: "sebres"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "50e9528765c18296566374b3fde2df942c394efd"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "sebres"
    14. subsystem initialized to: "38. Init - Library - Autoload"
    15. title initialized to:
      Performance penalty by creation of interp compared to old versions
      
    16. type initialized to: "Bug"
  2. Ticket change [ad6719d9b9] (rid 243426) by sebres on 2025-07-22 18:34:50:

    1. 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).
      
    2. login: "sebres"
    3. mimetype: "text/x-fossil-wiki"
  3. Ticket change [f63b9fa26d] (rid 243433) by oehhar on 2025-07-23 06:31:13:

    1. icomment:
      Great ! And the source code change is documented, I appreciate !
      Thanks for all,
      Harald
      
    2. login: "oehhar"
    3. mimetype: "text/plain"
  4. Ticket change [ff19c49619] (rid 243488) by sebres on 2025-07-26 14:53:44:

    1. 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).
      
    2. login: "sebres"
    3. mimetype: "text/x-fossil-wiki"
  5. Ticket change [34c4ce8663] (rid 244132) by apnadkarni on 2025-08-16 06:12:19:

    1. icomment:
      For one proposed improvement see [5773c78e86](https://core.tcl-lang.org/tcl/tktview/5773c78e86)
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-markdown"
  6. Ticket change [b82cec7d1d] (rid 244511) by dkf on 2025-08-23 08:29:26:

    1. 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.
      
    2. login: "dkf"
    3. mimetype: "text/x-markdown"
  7. Ticket change [717bf2c910] (rid 252092) by apnadkarni on 2026-03-14 04:07:14:

    1. 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
      ```
      
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  8. Ticket change [0a3bd6f46a] (rid 252093) by apnadkarni on 2026-03-14 04:18:35:

    1. closedate changed to: "2461113.6795784724"
    2. closer changed to: "apnadkarni"
    3. login: "apnadkarni"
    4. mimetype: "text/plain"
    5. resolution changed to: "Fixed"
    6. status changed to: "Closed"