Skip to content
Tcl Source Code Artifact [bb677bda26]
Login

Artifact [bb677bda26]

Artifact bb677bda26ce2e7d36d9a209b90cafffc324935f:

Ticket change [bb677bda26] - New ticket [218379ffffffffff|218379ffff] <i>speeding up tclPkgUnknown</i>. by nobody on 2000-10-26 00:56:53.
D 2000-10-26T00:56:53
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s4355\sRFE\nVersion:\s8.2.3\nSubmitDate:\s'2000-03-10'\nLastModified:\s'2000-08-15'\nSeverity:\sLOW\nStatus:\sClosed\nSubmitter:\stechsupp\nChangedBy:\sericm\nOS:\sBSD\nOSVersion:\sFreeBSD-4.0\s-current\nMachine:\sDual\sPIII-450\nFixedDate:\s'2000-10-25'\nClosedDate:\s'2000-08-15'\n\n\nName:\n\nMikhail\sTeterin\n\n\nExtensions:\n\nTclX,\sSQL\n\n\nObservedBehavior:\n\nThe\simplementation\sof\stclPkgUnknown\suses\sfor(n)\sloop\sto\sgo\sthrough\sthe\sauto_path\slist.\n\n\nDesiredBehavior:\n\nUsing\sthe\sforeach(n)\sloop\sis\smuch\sneater\sand\sspeedier,\salthough\sthe\sspeed\sdifference\sis\shardly\snoticeable.\n\n\nPatch:\n\n---\slibrary/package.tclWed\sApr\s21\s17:50:29\s1999\n\n+++\slibrary/package.tclThu\sMar\s\s9\s22:41:39\s2000\n\n@@\s-438,3\s+438,3\s@@\n\n\s\s\s\s\s}\n\n-\s\s\s\sfor\s{set\si\s[expr\s{[llength\s$auto_path]\s-\s1}]}\s{$i\s>=\s0}\s{incr\si\s-1}\s{\n\n+\s\s\s\sforeach\sd\s$auto_path\s{\n\n\s#\swe\scan't\suse\sglob\sin\ssafe\sinterps,\sso\senclose\sthe\sfollowing\n\n@@\s-442,4\s+442,3\s@@\n\n\scatch\s{\n\n-\s\s\s\sforeach\sfile\s[glob\s-nocomplain\s[file\sjoin\s[lindex\s$auto_path\s$i]\s\\\n\n-\s\s\s\s*\spkgIndex.tcl]]\s{\n\n+\s\s\s\sforeach\sfile\s[glob\s-nocomplain\s[file\sjoin\s$d\s*\spkgIndex.tcl]]\s{\n\n\sset\sdir\s[file\sdirname\s$file]\n\n@@\s-452,3\s+451,3\s@@\n\n\s}\n\n-set\sdir\s[lindex\s$auto_path\s$i]\n\n+set\sdir\s$d\n\n\sset\sfile\s[file\sjoin\s$dir\spkgIndex.tcl]\n\n@@\s-466,5\s+465,4\s@@\n\n\s\s\s\s\stclMacPkgSearch\s$dir\n\n-\s\s\s\sforeach\sx\s[glob\s-nocomplain\s[file\sjoin\s$dir\s*]]\s{\n\n-if\s{[file\sisdirectory\s$x]}\s{\n\n-\s\s\s\sset\sdir\s$x\n\n+\s\s\s\sforeach\sdir\s[glob\s-nocomplain\s[file\sjoin\s$dir\s*]]\s{\n\n+if\s{[file\sisdirectory\s$dir]}\s{\n\n\s\s\s\s\stclMacPkgSearch\s$dir\n\n\nPatchFiles:\n\nlibrary/package.tcl\n\n\n\n\nThis\schanges\sthe\sorder\sin\swhich\sauto_path\sis\sprocessed\s--\sinstead\sof\slast\sto\sfirst,\sit\sis\sread\sfirst\sto\slast.\s\sThe\simplications\sof\sthat\smust\sbe\sinvestigated.\n\n-\seric\n\n--\s03/10/2000\sericm\n\nBecause\sthis\schanges\sthe\sorder\sof\sauto_path\ssearches,\sI\sthink\sthis\smodification\sshould\snot\sbe\smade.\s\sThe\sbenefit\sof\ssearching\sauto_path\slast\sto\sfirst\sis\sthat\sapplications\scan\sappend\sitems\sand\sbe\sguaranteed\sthat\stheir\slibraries\swill\sbe\sfound\sfirst,\sgiving\sthem\san\sopportunity\sto\soverride\ssystem\sdefaults.\n\nAs\syou\snoted,\sthe\sspeed\sgain\sis\snegligable,\sso\sit's\snot\sclear\sthat\sthere's\seven\sa\ssiginificant\sbenefit\sto\sbe\sgained\sfrom\sapplying\sthis\spatch.\s\sThe\scleaner\scode\sis\snice,\sbut\sat\sthe\scost\sof\sbackwards\sincompatibility,\sit\sis\sprobably\snot\sworth\sit.\s\sPerhaps\swith\sthe\s[listx\sreverse]\scommand\sthat\sought\sto\sbe\sin\s8.4,\swe\scan\sclean\sthe\scode\sand\sretain\sbackwards\scompatibility.\n\n\s\s\sEric\sMelski\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sThe\sOther\sTcl\sGuy\n\s\s\sericm\sat\sajubasolutions.com\s\s\s\s\s\s\s\s\s\s\s\sAjuba\sSolutions\n\n--\s08/15/2000\sericm\n\n
J foundin final:\s8.2.3
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 56.\sLibTomMath
J title speeding\sup\stclPkgUnknown
J type RFE
K 218379ffffffffffffffffffffffffffffffffff
U nobody
Z 7c7558e7dbf97d922f7f0abf327a06f7