Skip to content
Tcl Source Code History Of Ticket 218379
Login

History Of Ticket 218379

Artifacts Associated With Ticket 218379

  1. Ticket change [bb677bda26] (rid 129476) by nobody on 2000-10-26 00:56:53:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 4355 RFE
      Version: 8.2.3
      SubmitDate: '2000-03-10'
      LastModified: '2000-08-15'
      Severity: LOW
      Status: Closed
      Submitter: techsupp
      ChangedBy: ericm
      OS: BSD
      OSVersion: FreeBSD-4.0 -current
      Machine: Dual PIII-450
      FixedDate: '2000-10-25'
      ClosedDate: '2000-08-15'
      
      
      Name:
      
      Mikhail Teterin
      
      
      Extensions:
      
      TclX, SQL
      
      
      ObservedBehavior:
      
      The implementation of tclPkgUnknown uses for(n) loop to go through the auto_path list.
      
      
      DesiredBehavior:
      
      Using the foreach(n) loop is much neater and speedier, although the speed difference is hardly noticeable.
      
      
      Patch:
      
      --- library/package.tclWed Apr 21 17:50:29 1999
      
      +++ library/package.tclThu Mar  9 22:41:39 2000
      
      @@ -438,3 +438,3 @@
      
           }
      
      -    for {set i [expr {[llength $auto_path] - 1}]} {$i >= 0} {incr i -1} {
      
      +    foreach d $auto_path {
      
       # we can't use glob in safe interps, so enclose the following
      
      @@ -442,4 +442,3 @@
      
       catch {
      
      -    foreach file [glob -nocomplain [file join [lindex $auto_path $i] \
      
      -    * pkgIndex.tcl]] {
      
      +    foreach file [glob -nocomplain [file join $d * pkgIndex.tcl]] {
      
       set dir [file dirname $file]
      
      @@ -452,3 +451,3 @@
      
       }
      
      -set dir [lindex $auto_path $i]
      
      +set dir $d
      
       set file [file join $dir pkgIndex.tcl]
      
      @@ -466,5 +465,4 @@
      
           tclMacPkgSearch $dir
      
      -    foreach x [glob -nocomplain [file join $dir *]] {
      
      -if {[file isdirectory $x]} {
      
      -    set dir $x
      
      +    foreach dir [glob -nocomplain [file join $dir *]] {
      
      +if {[file isdirectory $dir]} {
      
           tclMacPkgSearch $dir
      
      
      PatchFiles:
      
      library/package.tcl
      
      
      
      
      This changes the order in which auto_path is processed -- instead of last to first, it is read first to last.  The implications of that must be investigated.
      
      - eric
      
      -- 03/10/2000 ericm
      
      Because this changes the order of auto_path searches, I think this modification should not be made.  The benefit of searching auto_path last to first is that applications can append items and be guaranteed that their libraries will be found first, giving them an opportunity to override system defaults.
      
      As you noted, the speed gain is negligable, so it's not clear that there's even a siginificant benefit to be gained from applying this patch.  The cleaner code is nice, but at the cost of backwards incompatibility, it is probably not worth it.  Perhaps with the [listx reverse] command that ought to be in 8.4, we can clean the code and retain backwards compatibility.
      
         Eric Melski                            The Other Tcl Guy
         ericm at ajubasolutions.com            Ajuba Solutions
      
      -- 08/15/2000 ericm
      
      
      
    4. foundin initialized to: "final: 8.2.3"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "56. LibTomMath"
    10. title initialized to: "speeding up tclPkgUnknown"
    11. type initialized to: "RFE"
  2. Ticket change [3468b01d7b] (rid 106760) by welch on 2000-10-26 08:21:16:

    1. closedate changed to: "2000-10-26T01:21:16"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [90cff0fa97] (rid 120519) by dgp on 2001-04-06 02:10:29:

    1. foundin changed to: "None"
    2. status changed to: "Open"
    3. subsystem changed to: "None"
  4. Ticket change [d89fe5ff3c] (rid 107475) by dgp on 2001-04-06 02:12:12:

    1. closedate changed to: "2001-04-05T19:12:12"
    2. closer changed to: "dgp"
    3. status changed to: "Closed"
    4. subsystem changed to: "39. Package Manager"