Skip to content
Tcl Source Code History Of Ticket 1523878
Login

History Of Ticket 1523878

Artifacts Associated With Ticket 1523878

  1. Ticket change [42ef148c92] (rid 116461) by coldstore on 2006-07-17 14:29:36:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      [interp create] is quite expensive to perform, because
      the setup of environment is very flexible.
      
      [interp create] calls Tcl_CreateInterp() and
      Tcl_Init(), Tcl_Init() is where the environment is set up.
      
      Tcl_Init()'s processing first evaluates the script in
      the C char* tclPreInitScript (if any) and then
      evaluates a script which is hard-coded into tclInterp,
      which first checks to see if a proc tclInit exists,
      defines it if not, then calls it.
      
      The hard-coded tclInit searches the file system in
      several well known places for a file called init.tcl,
      which it then sources.
      
      This search/source is repeated for *every* [interp create].
      
      I would like the ability to obviate the expensive
      searching/sourcing for some [interp create]s.
      
      One way to do this is to set tclPreInitScript to "proc
      tclInit {} {}" which will short-circuit the search/source.
      
      If the C function TclSetPreInitScript were exposed to
      tcl, one could perform this short-circuit prior to
      [interp create] and achieve a 3-fold speedup in [interp
      create], according to my tests.
      
      Furthermore, if the the function were exposed, then
      init.tcl could, when sourced, store its effective
      content into the tclPreInitScript C variable as a proc
      tclInit body, and then subsequent [interp create]s
      would use the searched and sourced init.tcl
      functionality without having to re-search and re-source
      the code.
      
      The necessary changes to achieve this are minimal.  The
      speedup should be considerable.
      
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "coldstore"
    9. subsystem initialized to: "None"
    10. title initialized to: "obviating init.tcl search.source in interp create"
    11. type initialized to: "RFE"
  2. Ticket change [9694cb8fda] (rid 106347) by dkf on 2006-08-07 21:21:07:

    1. assignee changed to: "dgp"
    2. subsystem changed to: "38. Init - Library - Autoload"
  3. Ticket change [0c4bc3d868] (rid 114150) by dgp on 2006-08-08 02:40:36:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      As mentioned in the chat,
      the way forward is an extension
      that provides its own
      interp creation command, one
      that calls only Tcl_CreateInterp()
      and not Tcl_Init() in addition.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [d354753c75] (rid 123275) by dgp on 2007-09-06 04:52:06:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: NO
      
      
      see also 1557574
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"