<i>[namespace delete] unbearably slow</i> status still Open with 4 other changes
by
.
D 2015-07-24T07:43:27.995
J icomment Upon\sfurther\sinspection,\sI\sattest\sthat\sthe\scode\sin\sbranch\sbug-f97d4ee020\scannot\spossibly\sfix\sthe\sissue\sin\sthis\sticket.\s\sThe\sunderlying\scause\sis\sanalogous:\sdeleting\sa\shash\stable\srequires\smore\swork\sif\sthe\stable\sis\ssubject\sto\schange\sduring\sthe\siteration.\r\n\r\nThe\sdifference\sbetween\sthis\sissue\sand\sthat\sof\shttp://core.tcl.tk/tcl/info/f97d4ee020\sis\sthat\sthe\slatter\sfills\sthe\snamespace\swith\ssub-namespaces,\swhere\sthis\sone\sfills\sthe\snamespace\swith\sprocedures.\r\n\r\nThe\schanges\sin\sbranch\sbug-f97d4ee020\saffect\sthe\siteration\sthrough\sthe\snsPtr->childTable.\s\sChanging\sthe\siteration\sthrough\sthe\snsPtr->cmdTable\sin\sa\ssimilar\sway:\r\n\r\n~~~\r\n---\sgeneric/tclNamesp.c\s2015-07-24\s09:26:47.621134045\s+0200\r\n+++\sgeneric/tclNamesp.c.orig\s\s\s\s2015-07-24\s09:27:21.598132784\s+0200\r\n@@\s-1128,11\s+1128,7\s@@\r\n\s\r\n\s\s\s\s\sfor\s(entryPtr\s=\sTcl_FirstHashEntry(&nsPtr->cmdTable,\s&search);\r\n\s\s\s\s\s\s\s\s\s\s\s\sentryPtr\s!=\sNULL;\r\n-#if\s0\r\n\s\s\s\s\s\s\s\s\s\s\s\sentryPtr\s=\sTcl_FirstHashEntry(&nsPtr->cmdTable,\s&search)\r\n-#else\r\n-\s\s\s\s\s\s\s\s\s\s\sentryPtr\s=\sTcl_NextHashEntry(&search)\r\n-#endif\r\n\s\s\s\s\s\s\s\s)\s{\r\n\s\s\s\s\s\s\s\scmd\s=\sTcl_GetHashValue(entryPtr);\r\n\s\s\s\s\s\s\s\sTcl_DeleteCommandFromToken((Tcl_Interp\s*)\siPtr,\scmd);\r\n~~~\r\n\r\ndoes\sindeed\s"fix"\sthe\stimings.\r\n\r\nIt\scould\sbe\ssaid\sthat\sthis\sissue\sduplicates\shttp://core.tcl.tk/tcl/info/f97d4ee020\sin\sthat\sa\sfix\sfor\sthe\slatter\swould\sprobably\sapply\sas\swell\sfor\sthis\sone.\s\sNevertheless,\sthe\sexplanation\sas\sto\swhy\srenaming\sthe\scommands\sthen\sdeleting\sthe\snamespace\sis\sfaster\sthan\ssimply\sdeleting\sthe\snamespace\swould\sremain\s(for\sme)\smysteriously\sunknown.\s\sThat\sis,\swhy\scan\sthe\sformer\sperform\slinearly\sand\sthe\slatter\snot?
J login anonymous
J mimetype text/plain
J username Adrián\sMedraño\sCalvo\s<[email protected]>
K e76f0a6ca52a2ff3c2b1e9cb2585f3de0c44ab5d
U anonymous
Z b4c63bd419bb0c8c0f9386081f1dca5a