Artifacts Associated With Ticket 218379
Ticket change [bb677bda26] (rid 129476) by nobody on 2000-10-26 00:56:53:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- 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 - foundin initialized to: "final: 8.2.3"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "56. LibTomMath"
- title initialized to: "speeding up tclPkgUnknown"
- type initialized to: "RFE"
Ticket change [3468b01d7b] (rid 106760) by welch on 2000-10-26 08:21:16:
- closedate changed to: "2000-10-26T01:21:16"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [90cff0fa97] (rid 120519) by dgp on 2001-04-06 02:10:29:
- foundin changed to: "None"
- status changed to: "Open"
- subsystem changed to: "None"
Ticket change [d89fe5ff3c] (rid 107475) by dgp on 2001-04-06 02:12:12:
- closedate changed to: "2001-04-05T19:12:12"
- closer changed to: "dgp"
- status changed to: "Closed"
- subsystem changed to: "39. Package Manager"