Overview
| Artifact ID: | 5765b4cf3f3c50865eec8177932e60675a8f3842 |
|---|---|
| Ticket: | f97d4ee02082971e4b86a853c18c093fd0b2a45d
quadratic cost of namespace teardown |
| User & Date: | dkf on 2015-07-23 13:37:18 |
Changes
- icomment:
The simplest possible thing would be to try using <tt>Tcl_NextHashEntry</tt> during the teardown instead of <tt>Tcl_FirstHashEntry</tt>. The only reason for using the other one is if you are adding elements during the teardown; if we can confirm that that won't happen, we won't hit problems since <tt>Tcl_NextHashEntry</tt> is safe for the iteration/deletion pattern. <p> Callbacks are OK provided they don't modify the hash table itself. Some sort of flag in the entries (not the <tt>Tcl_HashEntry</tt> but the things they point to) and another in the structure containing the hash table might be enough. I'd like to avoid putting the smarts in the <tt>Tcl_HashTable</tt> system itself as that's already quite complicated enough for a fundamental data structure.
- login: "dkf"
- mimetype: "text/html"
- priority changed to: "8"
- username: "dkf"