Overview
| Artifact ID: | 02eaeb1a4a0d7899cddfaeb4bdba77e2a5fbcd84 |
|---|---|
| Ticket: | e76f0a6ca52a2ff3c2b1e9cb2585f3de0c44ab5d
[namespace delete] unbearably slow |
| User & Date: | anonymous on 2015-07-20 09:59:01 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
Invoking [namespace delete] in a namespace with a huge number of procs/commands takes an excessively long time. That is not the case when removing the procedures individually. This causes issues to packages that create great many commands in a namespace, such as TclXML (one command per used node). The following snippet exhibits the issue: ~~~ set N 10000; foreach N {1000 10000 50000 100000 200000} { puts "== $N =="; puts [time { namespace eval test {}; for {set i 0} {$i < $N} {incr i} { proc ::test::abc$i {args} { puts $args; }; } namespace delete ::test; } 1]; puts [time { namespace eval test {}; for {set i 0} {$i < $N} {incr i} { proc ::test::abc$i {args} { puts $args; }; } for {set i 0} {$i < $N} {incr i} { ::rename ::test::abc$i {} } namespace delete ::test; } 1]; } ~~~ This is the output: ~~~ == 1000 == 5266 microseconds per iteration 6140 microseconds per iteration == 10000 == 44048 microseconds per iteration 32618 microseconds per iteration == 50000 == 2153807 microseconds per iteration 167686 microseconds per iteration == 100000 == 3373670 microseconds per iteration 338030 microseconds per iteration == 200000 == 25682504 microseconds per iteration 691066 microseconds per iteration ~~~ The elapsed time is greater than linear on the number of commands for [namespace delete]. - foundin changed to: "8.6.3"
- is_private changed to: "0"
- login: "anonymous"
- priority changed to: "5 Medium"
- private_contact changed to: "3410fe6f8504d01909e548b02e0cec50a5f7fab3"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "anonymous"
- subsystem changed to: "- New Builtin Commands"
- title changed to: "[namespace delete] unbearably slow"
- type changed to: "Bug"