Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c1bf1cf4ff207d6bb2f57a7ec1dc73bffc3cf27165f226ba64f87f7fcb5dfe79
Ticket: effa2e2346f8372ad4982d16bad189fab96ceb56
RFE - lazy loading of TclOO for faster interp creation
User & Date: dkf on 2025-09-01 08:45:17
Changes

  1. icomment:
    Thanks! (My testbed's using a little faster hardware, when it decides to turn on the speed-stepping.)
    
    You'll likely need to rethink how you lazily loading the classes, but I'm not sure how yet. Likely by postponing calling `MakeAdditionalClasses` (in tclOO.c). It's possible that some bits of `TclOOInitInfo` could be improved, but that's trickier because `info object` has some fully compiled subcommands. Postponing the creation of all the `oo::define` stuff (including the `oo::Slot` class; directly in `InitFoundation` and in `TclOODefineSlots`) would be the other place a win might be possible, though I'm not currently sure how.
    
    The main thing to beware of here is that there may be cases where a class (or object) is used in user code before calling it as a command, and before any call to `package require`. Educating users to change that is likely quite difficult!
    
  2. login: "dkf"
  3. mimetype: "text/x-markdown"