Artifacts Associated With Ticket b9ecf3ce98
Ticket change [88ae61c117] (rid 146635) by pooryorick on 2016-05-05 04:11:20:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-wiki"
- comment initialized to:
The following script causes a string representation to be generated for each item in the list passed to <code>uplevel</code>, but if a level specifier is added as the first argument to <code>uplevel</code>, string representations aren't generated: <code><verbatim> apply {{} { uplevel [list apply {{args} { foreach arg $args {puts [::tcl::unsupported::representation $arg]} }} {*}[list [expr 1] [expr 2]]] }} </verbatim></code> The generation of string representations for items in such a list could have a significant unexpected performance/memory impact. Ticket 1017884 is related, but this one-argument case could probably be fixed without the backward-incompatible change suggested in that ticket, since the single argument can be assumed to be the script to be evaluated. - foundin initialized to: "8.6.5"
- is_private initialized to: "0"
- login: "pooryorick"
- priority initialized to: "5 Medium"
- private_contact initialized to: "e476148cded301ffff84bcdc432536dc0c949e88"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "pooryorick"
- subsystem initialized to: "18. Commands M-Z"
- title initialized to:
[uplevel $list], [uplevel 1 $list] and generation of string representations
- type initialized to: "Bug"
Ticket change [bf67df259c] (rid 186854) by pooryorick on 2020-09-19 14:15:40:
- icomment: "Fixed in [45569c7084346632] for core-8-barnch."
- login: "pooryorick"
- mimetype: "text/x-fossil-wiki"
Ticket change [191070729b] (rid 186858) by pooryorick on 2020-09-19 14:34:37:
- icomment: "Fixed in [d67c23f6d1422fcf] for core-8-6-branch."
- login: "pooryorick"
- mimetype: "text/x-fossil-wiki"
Ticket change [c9f3dc345a] (rid 186860) by dgp on 2020-09-19 16:32:01:
- icomment:
Effect of this patch is to avoid string generation for the particular case of a pure list with no explicit level argument. Tradeoff is the shimmering generation of a list representation for values that came in with other intreps. Might mean loss of bytecode. Or fragile intreps. Or expensive ones. It's a lot easier to train coders to include the explicit level argument than to have mercurial performance dances like this.
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [114b3a249c] (rid 186909) by pooryorick on 2020-09-20 13:47:58:
- icomment:
This tradeoff has been mitigated by only checking list length if there is no string representation. This covers the bytecode case, which is probably the most important one. See [76da711d7172c54a]. It could be further mitigated by checking for a list or dict intrep first, and then ultimately by writing the TIP that would make the whole check unnecessary.
- login: "pooryorick"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [b5591bfa87] (rid 186984) by pooryorick on 2020-09-23 18:54:11:
- closedate changed to: "2459116.28763721"
- closer changed to: "pooryorick"
- login: "pooryorick"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"