Overview
| Artifact ID: | ca4addf7d4be48465cc9779b9419bf22f18ce342 |
|---|---|
| Ticket: | fa5c8a823085c0cd88bdd2d10a5c24f5ebb4bf07
memory cost and execution time exploding of nested namespaces |
| User & Date: | sebres on 2017-05-18 08:12:41 |
Changes
- icomment:
The memory consumption going to large full-qualified namespace name. Following example explain it (has comparable memory consumption as "namespace eval"): <code><pre> set name {}; set i 0; time {set ns($i) [set name ${name}::namespace[incr i]]} 10000 </pre></code> > pooryorick: <blockquote>It seems that the fully-qualified name of each created namespace is getting stored somewhere.</blockquote> Yes, see struct Namespace declaration "fullName" in tclInt.h. It is currently impossible without this member, because used everywhere and the auto-retrieving on demand would be admittedly possible, but will used almost immediately. I'll take a look later what would be possible to optimize it. - login: "sebres"
- mimetype: "text/x-fossil-wiki"