Skip to content
Tcl Source Code Artifact [5f60e44799]
Login

Artifact [5f60e44799]

Artifact 5f60e4479926227bcdaa0e56d87703d2aa06c319:

Ticket change [5f60e44799] - Ticket [2992970fffffffff|2992970fff] <i>Slow performance of [append]</i> status still Closed with 6 other changes by dgp on 2014-01-15 18:11:14.
D 2014-01-15T18:11:14.583
J closedate 2456673.25780767
J closer dgp
J icomment Postscript\son\sthis\sbug\sfix.\r\n\r\nThe\screation\sof\sthe\snew\sroutine\sTclAppendBytesToByteArray()\r\nthat\sincludes\sa\ssmart(er)\sbytearray\sgrowth\salgorithm\swas\r\neffective\sin\srestoring\sefficient\sappends\sto\spure\sbytearrays;\sYay!\r\n\r\nAs\sa\sminor\spoint\sthough,\sthere\sis\sa\scomment\sin\sthe\spart\sof\r\nTcl_AppendObjToObj()\sthat\shandles\sthis\scase\sto\sthe\seffect\r\nthat\syou\scan\sreliably\sdepend\son\r\n\r\n\s\s\s\sTcl_AppendObjToObj(x,\sx);\r\n\r\nto\swork.\s\sThe\snew\simplementation\sdoes\snot\sin\sfact\spreserve\r\nthat\sguarantee.\s\sSpecifically\son\sthe\scurrent\strunk,\sthe\r\nvalue\sof\sbytesSrc\spassed\sto\sTABTBA()\sis\sat\srisk\sof\sbecoming\r\ninvalid\sby\sthe\stime\sit\sis\sused,\sdue\sto\sreallocs\sthat\sTABTBA\r\nmight\sperform.\r\n\r\nNow\sin\sa\sCopy\sOn\sWrite\ssystem\slike\sTcl\shas,\sI\scan't\simagine\r\nwhen\sanyone\swould\swant\sto\scall\r\n\r\n\s\s\s\sTcl_AppendObjToObj(x,\sx);\r\n\r\nI\scannot\sfind\sany\sway\sto\sinduce\sany\sof\sthe\sexisting\sT_AOTO()\r\ncalls\sin\sthe\sTcl\ssources\sto\sattempt\sit,\sand\sthat\slikely\sexplains\r\nwhy\sthe\stest\ssuite\sdoesn't\scover\sthe\spossibility.\r\n\r\nMy\spreference\sis\sto\sremove\sthe\s(now\sfalse)\scomment,\sand\spossibly\r\neven\sadd\sa\spanic\sdetecting\sany\sattempt\sto\sappend\sa\svalue\sto\sitself\r\ndeclaring\sit\sto\sbe\sa\sCoW\sviolation.\s\sAny\sreason\snot\sto\sdo\sthat?
J login dgp
J mimetype text/plain
J severity Minor
K 2992970fffffffffffffffffffffffffffffffff
U dgp
Z fef39f04463b1989a5a4f1371664bca8