Itcl - the [incr Tcl] extension

Check-in [e51f71f88b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Demo of the enormous object creation performance gains created when every object creation doesn't call on [itcl::find].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-04470f9067
Files: files | file ages | folders
SHA1: e51f71f88b11345952e8c6101fa94ad92571e6ed
User & Date: dgp 2015-03-23 18:54:53
Context
2015-04-03
19:16
[04470f9067] Stop running a [find classes] for every object creation. Stop duplication and simplify namespace wrangling. Check command existence with [namespace which], *not* [info command]. check-in: 038978efcb user: dgp tags: trunk
2015-03-23
18:54
Demo of the enormous object creation performance gains created when every object creation doesn't call on [itcl::find]. Closed-Leaf check-in: e51f71f88b user: dgp tags: bug-04470f9067
2015-03-11
17:45
merge release check-in: caec4b1279 user: dgp tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/itclBase.c.

101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
"    set mySelf [::oo::Helpers::self]\n"
"    if {[::itcl::is class $mySelf]} {\n"
"        set namespace [uplevel 1 namespace current]\n"
"        set my_namespace $namespace\n"
"        if {$my_namespace ne \"::\"} {\n"
"            set my_namespace ${my_namespace}::\n"
"        }\n"
"        set my_class [::itcl::find classes ${my_namespace}$m]\n"
"        if {[string length $my_class] > 0} {\n"
"            # class already exists, it is a redefinition, so delete old class first\n"
"	    ::itcl::delete class $my_class\n"
"        }\n"
"        set cmd [uplevel 1 [list ::info command ${my_namespace}$m]]\n"
"        if {[string length $cmd] > 0} {\n"
"            error \"command \\\"$m\\\" already exists in namespace \\\"$namespace\\\"\"\n"
"        }\n"
"    } \n"
"    set myns [uplevel namespace current]\n"
"    if {$myns ne \"::\"} {\n"







|
|
|
|
|







101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
"    set mySelf [::oo::Helpers::self]\n"
"    if {[::itcl::is class $mySelf]} {\n"
"        set namespace [uplevel 1 namespace current]\n"
"        set my_namespace $namespace\n"
"        if {$my_namespace ne \"::\"} {\n"
"            set my_namespace ${my_namespace}::\n"
"        }\n"
"#        set my_class [::itcl::find classes ${my_namespace}$m]\n"
"#        if {[string length $my_class] > 0} {\n"
"#            # class already exists, it is a redefinition, so delete old class first\n"
"#	    ::itcl::delete class $my_class\n"
"#        }\n"
"        set cmd [uplevel 1 [list ::info command ${my_namespace}$m]]\n"
"        if {[string length $cmd] > 0} {\n"
"            error \"command \\\"$m\\\" already exists in namespace \\\"$namespace\\\"\"\n"
"        }\n"
"    } \n"
"    set myns [uplevel namespace current]\n"
"    if {$myns ne \"::\"} {\n"