Skip to content
Tcl Source Code History Of Ticket 3523089fffffffffffffffffffffffffffffffff
Login

History Of Ticket 3523089fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 3523089fffffffffffffffffffffffffffffffff

  1. Ticket change [d47c8c3d8a] (rid 123450) by basilik99 on 2012-05-02 17:57:13:

    1. assignee initialized to: "dgp"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      This is a follow-up of ticket ID 680169 "Tcl interpreter pkgIndex 'cache'". Please find attached a modified version of the patch. Description is in the previous ticket.
      Please comment.
      
    4. foundin initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "basilik99"
    10. subsystem initialized to: "39. Package Manager"
    11. title initialized to: "Tcl interpreter pkgIndex 'cache' - new version"
    12. type initialized to: "RFE"
  2. Ticket change [f1d12ee9fc] (rid 109422) by basilik99 on 2012-05-03 00:57:17:

    1. icomment:
      
      
      File Added - 442610: packages_cache.tcl
      
      
      
    2. login: "basilik99"
    3. mimetype: "text/plain"
    4. username: "basilik99"
  3. Add attachment "packages_cache.tcl" [84865f62da] (rid 117564) by basilik99 on 2012-05-03 00:57:17.

  4. Ticket change [0104700673] (rid 119405) by basilik99 on 2012-05-15 03:23:45:

    1. icomment:
      I have improved the patch. Please find attached packages_cache_improved.tcl.
      
      1- Removed the cache file from [info library]. This was an error I think. The cache is already user and machine specific so it is useless to put it in a shared location. But worse: writing it to [info library] makes the cache copy itself on all computers, and for all Tcl installations! E.g. suppose there are 2 versions of Tcl installed on a network drive (A and B) and that everyone uses version A. If one person executes version B once, its local cache will be updated with B's packages. Then, when using A again, this local B-specific cache will get copied to A's [info library] and from there to all other users home directory...
      
      2- Read the cache file once per Tclsh invocation, except when auto_path has changed.
      
      3- Avoided writing the cache file each time tcl::PackageIndexCache is invoked. Only write it when the [package unknown] search have found something new. Indeed, some packages (as md5) depend optionnaly on other packages which are not installed by default in ActiveState Tcl. [package require md5] hence always searches for 3 packages that are not there. Writing the cache each time is a time spoil.
      
      With these changes, Tcl now not only starts faster when installed on a network drive, but also when installed locally. See by yourself. Measures taken with a fresh ActiveState Tcl 8.6b7 installation on C:\ drive on Wiindows:
      
      Without patch:
      time {package require tdom}: 64ms
      time {package require md5}: 102ms
      time {package require Tclx}: 48ms
      
      With the patch:
      time {package require tdom}: 42ms
      time {package require md5}: 114ms
      time {package require Tclx}: 18ms
      
      And the starup time of Tclsh.exe itself is quite the same with and without the patch (my measure tool for this is not very good, so to be confirmed by someone).
      
      Only md5 is slower, but only by 11%... But again, this is because md5 depends on tcllibc. If tcllibc is installed, load time with the patch drops below time without patch.
      
      
      At this point, couldn't this patch be integrated OFFICIALLY into Tcl releases? [package require] is just faster than normal Tcl! Or we way consider to ask the user at installation if he wants that cache feature, and strongly recommend it if Tcl is not installed locally.
      
      
    2. login: "basilik99"
    3. mimetype: "text/plain"
    4. username: "basilik99"
  5. Add attachment "packages_cache_improved.tcl" [06981e0efa] (rid 89246) by basilik99 on 2012-05-15 03:24:28.

  6. Ticket change [251a064272] (rid 131227) by basilik99 on 2012-05-15 03:24:29:

    1. icomment:
      
      
      File Added - 443495: packages_cache_improved.tcl
      
      
      
    2. login: "basilik99"
    3. mimetype: "text/plain"
    4. username: "basilik99"