Skip to content
Tcl Source Code Artifact [0104700673]
Login

Artifact [0104700673]

Artifact 0104700673533917e66442110c1840d6c3a99265:

Ticket change [0104700673] - Ticket [3523089fffffffff|3523089fff] <i>Tcl interpreter pkgIndex &#39;cache&#39; - new version</i> status still Open with 4 other changes by basilik99 on 2012-05-15 03:23:45.
D 2012-05-15T03:23:45
J icomment I\shave\simproved\sthe\spatch.\sPlease\sfind\sattached\spackages_cache_improved.tcl.\n\n1-\sRemoved\sthe\scache\sfile\sfrom\s[info\slibrary].\sThis\swas\san\serror\sI\sthink.\sThe\scache\sis\salready\suser\sand\smachine\sspecific\sso\sit\sis\suseless\sto\sput\sit\sin\sa\sshared\slocation.\sBut\sworse:\swriting\sit\sto\s[info\slibrary]\smakes\sthe\scache\scopy\sitself\son\sall\scomputers,\sand\sfor\sall\sTcl\sinstallations!\sE.g.\ssuppose\sthere\sare\s2\sversions\sof\sTcl\sinstalled\son\sa\snetwork\sdrive\s(A\sand\sB)\sand\sthat\severyone\suses\sversion\sA.\sIf\sone\sperson\sexecutes\sversion\sB\sonce,\sits\slocal\scache\swill\sbe\supdated\swith\sB's\spackages.\sThen,\swhen\susing\sA\sagain,\sthis\slocal\sB-specific\scache\swill\sget\scopied\sto\sA's\s[info\slibrary]\sand\sfrom\sthere\sto\sall\sother\susers\shome\sdirectory...\n\n2-\sRead\sthe\scache\sfile\sonce\sper\sTclsh\sinvocation,\sexcept\swhen\sauto_path\shas\schanged.\n\n3-\sAvoided\swriting\sthe\scache\sfile\seach\stime\stcl::PackageIndexCache\sis\sinvoked.\sOnly\swrite\sit\swhen\sthe\s[package\sunknown]\ssearch\shave\sfound\ssomething\snew.\sIndeed,\ssome\spackages\s(as\smd5)\sdepend\soptionnaly\son\sother\spackages\swhich\sare\snot\sinstalled\sby\sdefault\sin\sActiveState\sTcl.\s[package\srequire\smd5]\shence\salways\ssearches\sfor\s3\spackages\sthat\sare\snot\sthere.\sWriting\sthe\scache\seach\stime\sis\sa\stime\sspoil.\n\nWith\sthese\schanges,\sTcl\snow\snot\sonly\sstarts\sfaster\swhen\sinstalled\son\sa\snetwork\sdrive,\sbut\salso\swhen\sinstalled\slocally.\sSee\sby\syourself.\sMeasures\staken\swith\sa\sfresh\sActiveState\sTcl\s8.6b7\sinstallation\son\sC:\\\sdrive\son\sWiindows:\n\nWithout\spatch:\ntime\s{package\srequire\stdom}:\s64ms\ntime\s{package\srequire\smd5}:\s102ms\ntime\s{package\srequire\sTclx}:\s48ms\n\nWith\sthe\spatch:\ntime\s{package\srequire\stdom}:\s42ms\ntime\s{package\srequire\smd5}:\s114ms\ntime\s{package\srequire\sTclx}:\s18ms\n\nAnd\sthe\sstarup\stime\sof\sTclsh.exe\sitself\sis\squite\sthe\ssame\swith\sand\swithout\sthe\spatch\s(my\smeasure\stool\sfor\sthis\sis\snot\svery\sgood,\sso\sto\sbe\sconfirmed\sby\ssomeone).\n\nOnly\smd5\sis\sslower,\sbut\sonly\sby\s11%...\sBut\sagain,\sthis\sis\sbecause\smd5\sdepends\son\stcllibc.\sIf\stcllibc\sis\sinstalled,\sload\stime\swith\sthe\spatch\sdrops\sbelow\stime\swithout\spatch.\n\n\nAt\sthis\spoint,\scouldn't\sthis\spatch\sbe\sintegrated\sOFFICIALLY\sinto\sTcl\sreleases?\s[package\srequire]\sis\sjust\sfaster\sthan\snormal\sTcl!\sOr\swe\sway\sconsider\sto\sask\sthe\suser\sat\sinstallation\sif\she\swants\sthat\scache\sfeature,\sand\sstrongly\srecommend\sit\sif\sTcl\sis\snot\sinstalled\slocally.\n
J login basilik99
J mimetype text/plain
J username basilik99
K 3523089fffffffffffffffffffffffffffffffff
U basilik99
Z 65b6d54822099beca4af77e42977e2e0