Activity for [incr Tcl]

  • Michał Mrozik Michał Mrozik created ticket #293

    Destructor silently fails to delete class object

  • [incr Tcl] [incr Tcl] released /[Incr Tcl_Tk]-source/itcl 3.4.4/itcl3.4.4.tar.gz

  • [incr Tcl] [incr Tcl] released /[incr Tcl_Tk]-4-source/itcl 4.2.3/itcl4.2.3.tar.gz

  • [incr Tcl] [incr Tcl] released /[incr Tcl_Tk]-4-source/itcl 4.2.2/itcl4.2.2.tar.gz

  • Szabó László Zoltán Szabó László Zoltán created ticket #292

    Thread containing an itcl::ensemble crashes by releasing

  • [incr Tcl] [incr Tcl] released /[incr Tcl_Tk]-4-source/itcl 4.2.0/itcl4.2.0.tar.gz

  • Don Porter Don Porter modified ticket #291

    memory leak in ItclCreateArgList function

  • Don Porter Don Porter posted a comment on ticket #291

    Sure looks like this was fixed more than 2 years ago. Upgrade to fix. https://core.tcl-lang.org/itcl/info/0b0d0e0b8cd8105c

  • Don Porter Don Porter posted a comment on ticket #291

    That said, the routine ItclCreateArgList() in current development certainly includes ckfree() calls on both argv and defaultArgv. Can you specify the code path that misses those calls and leaks?

  • Don Porter Don Porter posted a comment on ticket #291

    ~~~ All work on Itcl 4.0.* is abandoned. Upgrade to Itcl 4.1.2 or development trunk.

  • Gevorg Tevosyan Gevorg Tevosyan posted a comment on ticket #291

    My Itcl version is 4.0.4

  • Gevorg Tevosyan Gevorg Tevosyan created ticket #291

    memory leak in ItclCreateArgList function

  • Joakim Tjernlund Joakim Tjernlund created ticket #54

    Please release 4.1.3

  • Tim Tomkinson Tim Tomkinson created ticket #290

    Class Procedures Can Be Called Like Methods

  • Tim Tomkinson Tim Tomkinson created ticket #289

    Composition Access Error

  • Tim Tomkinson Tim Tomkinson created ticket #288

    itcl::local does not support class names that start with a digit

  • Trey Jackson Trey Jackson posted a comment on ticket #271

    Related performance issue, using latest Itcl (4.1.1) versus 3.2, a 2.6X slowdown in simple script Itcl 3.2: 4.7 seconds Itcl 4.1.1: 12.2 seconds Script is: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17#!/bin/sh #-*-Tcl-*- the next line restarts using wish \ exec tclsh "$0" "$@" puts "Itcl version: [package require Itcl]" itcl::class myclass { public method member_function {} {} public method call_member_function {ntimes} { for {set i 0} {$i < $ntimes} {incr i} { member_function } } } myclass myobj puts...

  • Trey Jackson Trey Jackson created ticket #287

    itcl::scope and itcl::configbody interaction: can't scope variable: missing object context

  • Tim Tomkinson Tim Tomkinson created ticket #286

    Recursive method memory leak

  • Don Porter Don Porter posted a comment on ticket #117

    Once I set up a testbed with all those outdated releases on an OSX High Sierra system, my testing shows no failure running the test script. Sorry, but there continues to be nothing I can do when I cannot reproduce the failure.

  • Pan Chai Pan Chai posted a comment on ticket #117

    This is still happening. I have more information about this one, Xcode: 9.4+ Mac OSX: Sierra and High Sierra. The test scripts is failing now all the time, once I upgraded Xcode to 9.4.2. Again, I enclosed this script for you.. package require Iwidgets ::iwidgets::radiobox .pref -labeltext "Window Management" .pref add NONE -text "Leave existing windows open when opening new one" .pref add HIDE -text "Hide existing windows when opening new one" .pref add CLOSE -text "Close existing windows when opening...

  • Trey Jackson Trey Jackson posted a comment on ticket #271

    Can I request a new release of Itcl with this patch on it? 4.1.2? We're trying to finish our porting to Tcl 8.6, and this would help us improve our performance tests to come close to 8.4 performance.

  • Tim Tomkinson Tim Tomkinson created ticket #285

    Duplicate method/proc error message

  • Tim Tomkinson Tim Tomkinson created ticket #284

    Remove "my" from constructor error message

  • Trey Jackson Trey Jackson posted a comment on ticket #271

    That was huge. Thanks. The time spent in Tcl_Preserve/Tcl_Release is much reduced (from a total of >20 seconds to about 6 seconds). There are no obvious Itcl-related performance issues for this particular usage of my tool. On to the next issue for me!

  • Poor Yorick Poor Yorick posted a comment on ticket #271

    In commit 7388d7698118df3 ItclMemberCode uses reference counting instead of Itcl_PreserveData.

  • Trey Jackson Trey Jackson posted a comment on ticket #271

    Gladly.

  • Don Porter Don Porter posted a comment on ticket #271

    When an ItclMemberCode improvement is done, we'll want you to try it and determine how much it helps you.

  • Trey Jackson Trey Jackson posted a comment on ticket #271

    So... did you want something specific from me? I could update the Itcl code to see which calls are actually being taken - along with a counter. Let me know, I can modify things.

  • Don Porter Don Porter posted a comment on ticket #271

    Looks like the next low-hanging fruit in preserve elimination is ItclMemberCode. Give it a proper refcount as we've done with several other structs now.

  • Don Porter Don Porter posted a comment on ticket #271

    Sorry, no. At base that implementation also calls Tcl_Preserve.

  • Don Porter Don Porter posted a comment on ticket #271

    There's a build option in Itcl, ITCL_PRESERVE_DEBUG that makes it use its own implementation instead of a call to Tcl_Preserve. It's possible that will have a different performance impact.

  • Don Porter Don Porter posted a comment on ticket #271

    ~~~~ Ok. It's only in the implementation of Itcl_PreserveData(), but that still gets significant use.

  • Don Porter Don Porter posted a comment on ticket #271

    ~~~~ I see only 3 calls to Tcl_Preserve() left in the Itcl trunk of development. You're really seeing one or more of them account for significant runtime? Please tell more.

  • Trey Jackson Trey Jackson posted a comment on ticket #271

    Side question - in my profiling, the vast majority of the time (between 3.2 and 4.1.1) appears to be in Tcl_Preserve/Tcl_Release, and those appear to be relatively unchanged between Tcl 8.4 and 8.6. Any idea why this might be? Just used more now? Perhaps teh Tcl_MutexLock/Unlock is slower? (I've got a single Tcl interpreter, there might be other threads in the application, but they're not Tcl related....)

  • Trey Jackson Trey Jackson posted a comment on ticket #271

    Object creation local to a proc is 3-4X slower in 4.1.1 vs. 3.2 (don' t have 3.4 numbers) Itcl 3.2 12 microseconds per iteration for 10000 creation of objects in a proc call Itcl 4.1.1 45.0342 microseconds per iteration for 10000 creation of objects in a proc call Note: it's only about 36 microseconds if the SimpleClass is an empty class, ala itcl::class SimpleClass {} But it's instructive that adding a variable and method to a class increases the runtime by ~30% in 4.1.1, whereas in 3.2, the runtime...

  • Trey Jackson Trey Jackson posted a comment on ticket #271

    Understood. Just pointing out areas of potential slowdown. I'll put in a couple more.

  • Don Porter Don Porter posted a comment on ticket #271

    Confirmed I see factor of 4 slower operation in Itcl 4.1.1 compared with 3.4.4. No idea yet whether there's anything reasonable that can be done about it.

  • Don Porter Don Porter posted a comment on ticket #271

    I don't think it's a bug, no. I think it's intrustion into an implementation detail. If there's documentation otherwise, let me know.

  • Trey Jackson Trey Jackson posted a comment on ticket #271

    So, where do I file a bug against 3.4.4? It works in 4.1.1, and 3.2, so it seems like a bug, no?

  • Don Porter Don Porter posted a comment on ticket #271

    ok, I see. "proc: -> "itcl::body" makes it work ok.

  • Don Porter Don Porter posted a comment on ticket #271

    Indeed these test scripts do not run in Itcl 3.4.4. That's what I'm willing to test.

  • Trey Jackson Trey Jackson modified a comment on ticket #271

    Fair enough. Here's the singleton example - no code change, works for me with Tcl 8.67 and Itcl 4.1.1 (actually latest fossil version), and in 8.4 3.2 Note: GetSingleton is defined using [proc], which has always worked for us (Itcl 3.2 or 4.1) - but it does have problems with Itcl 3.4. It's fixed by changing that to [itcl::body]. Perhaps that's the issue you saw (Itcl 3.4?). Anyway, output first, then script Tcl 8.6.7 Itcl 4.1.1 12.9345 microseconds per iteration per each 10000 class calls that use...

  • Trey Jackson Trey Jackson posted a comment on ticket #271

    Fair enough. Here's the singleton example - no code change, works for me with Tcl 8.67 and Itcl 4.1.1 (actually latest fossil version), and in 8.4 3.2 Note: GetSingleton is defined using [proc], which has always worked for us (Itcl 3.2 or 4.1) - but it does have problems with Itcl 3.4. It's fixed by changing that to [itcl::body]. Perhaps that's the issue you saw (Itcl 3.4?). Anyway, output first, then script Tcl 8.6.7 Itcl 4.1.1 12.9345 microseconds per iteration per each 10000 class calls that use...

  • Don Porter Don Porter posted a comment on ticket #283

    This is probably related: http://core.tcl.tk/tcl/tktview?name=3610400fff

  • Don Porter Don Porter posted a comment on ticket #283

    ~~~~ This change is due to a re-implementation in terms of [tailcall]. Here's a Tcl-only demonstration: % proc cb args {puts TRACE:$args} % proc demo {} { tailcall string cat x } % trace add execution demo leave cb % demo TRACE:demo 0 {} leave x If execution traces and [tailcall] are not supposed to interact this way, it's a matter to get resolved in Tcl itself.

  • Don Porter Don Porter posted a comment on ticket #271

    Maybe we can try this with one focused, working example at a time?

  • Don Porter Don Porter posted a comment on ticket #271

    Demo script doesn't work: invalid command name "GetSingleton" while executing "GetSingleton" (procedure "CWithProc::CallSomeMethod" line 2) invoked from within "CWithProc::CallSomeMethod" invoked from within "time {CWithProc::CallSomeMethod} $count" (procedure "test_calls_to_singleton_via_class_proc" line 2) invoked from within "test_calls_to_singleton_via_class_proc" (file "/home/dgp/sf271.tcl" line 274)

  • Trey Jackson Trey Jackson posted a comment on ticket #271

    I've been tracking down performance issues with Itcl, and while 4.1.1 (and top of trunk) definitely improve things, there are a couple of simple patterns which exhibit degradation from Itcl 3.2 local object creation/deletion in Tcl proc: 4.1.1: 48micros 3.2: 11micros, ratio: ~4:1 call to member method via eval and itcl::code: 4.1.1 4.8micros, 3.2: 1micros, ratio: ~5:1 a simple singleton pattern: 4.1.1 13.7micros, 3.2: 2 micros. ratio: ~7:1 other patterns have about a 30-50% performance penalty Output...

  • Trey Jackson Trey Jackson created ticket #283

    Itcl object creation interaction with [trace add execution Class leave]

  • Don Porter Don Porter modified ticket #267

    "info vars" fails with no pattern

  • Don Porter Don Porter posted a comment on ticket #267

    Fix committed to trunk. Will be in Itcl 4.1.2

  • Don Porter Don Porter posted a comment on ticket #267

    Don't know why it wasn't clear before, but this is a simple fix.

  • Don Porter Don Porter posted a comment on ticket #267

    $ tclsh % dict get [namespace ensemble configure info -map] vars ::tcl::info::vars % package require Itcl 4.1.1 % dict get [namespace ensemble configure info -map] vars ::itcl::builtin::Info::vars

  • Don Porter Don Porter posted a comment on ticket #267

    The "dgp-method-type" branch has become the Itcl 4.1.* branch which is now the trunk, so this needs a solution.

  • [incr Tcl] [incr Tcl] released /[Incr Widgets]/4.1.1/iwidgets-4.1.1.tar.gz

  • Don Porter Don Porter posted a comment on ticket #281

    Fixed for Itcl 4.1.2

  • Don Porter Don Porter modified ticket #281

    Protected common variables not visible to children

  • Tim Tomkinson Tim Tomkinson created ticket #282

    Missing object name should generate an error

  • Don Porter Don Porter modified ticket #119

    Throwing an error from within an itcl::ensemble causes a segmentation fault (core dump)

  • Don Porter Don Porter posted a comment on ticket #119

    Fixed for Itcl 4.1.2

  • Don Porter Don Porter posted a comment on ticket #119

    By all appearances, in the entire Itcl 4 development history, this just hasn't been done. I suspect it's not hard to do, but I'm not ready to predict a completion date. You can keep using Itcl 3.4.4 with Tcl 8.6 in the meantime.

  • Trey Jackson Trey Jackson posted a comment on ticket #119

    Is there a way to work around this issue temporarily?

  • Don Porter Don Porter posted a comment on ticket #119

    Itcl_InvokeEnsembleMethod is failing to set a ProcErrorProc.

  • Tim Tomkinson Tim Tomkinson created ticket #281

    Protected common variables not visible to children

  • Trey Jackson Trey Jackson created ticket #119

    Throwing an error from within an itcl::ensemble causes a segmentation fault (core dump)

  • [incr Tcl] [incr Tcl] released /[incr Tcl_Tk]-4-source/itcl 4.1.1/itcl4.1.1.tar.gz

  • Don Porter Don Porter modified ticket #118

    application error when using combobox dropdown

  • Don Porter Don Porter posted a comment on ticket #118

    Dup of bug 115. Already fixed.

  • Trey Jackson Trey Jackson created ticket #118

    application error when using combobox dropdown

  • Don Porter Don Porter modified ticket #280

    Obsolete references to "@itcl" syntax

  • Don Porter Don Porter modified ticket #280

    Obsolete references to "@itcl" syntax

  • Don Porter Don Porter modified ticket #279

    Extra quote in "scope" error message

  • Don Porter Don Porter posted a comment on ticket #279

    fixed for Itcl 3.4.4 and 4.1.1

  • Don Porter Don Porter posted a comment on ticket #279

    It appears this is an error inherited from Itcl 3.

  • Tim Tomkinson Tim Tomkinson created ticket #280

    Obsolete references to "@itcl" syntax

  • Tim Tomkinson Tim Tomkinson created ticket #279

    Extra quote in "scope" error message

  • Tim Tomkinson Tim Tomkinson posted a comment on ticket #271

    I don't think this can get much faster given its current design. There are a lot of new calls to the Tcl core that the old code didn't make (e.g. Tcl_NewObjectInstance, dictionary functions, etc.), which is where most of the time is spent. Too bad, but I guess that's the price of progress.

  • Don Porter Don Porter posted a comment on ticket #271

    tclconfig is a separate project core.tcl.tk/tclconfig/ See these instructions http://core.tcl.tk/itcl/wiki?name=Tracking+Itcl+Sources

  • Tim Tomkinson Tim Tomkinson posted a comment on ticket #271

    That's a lot better! The creation time is now constant, but it's still significantly slower than 3.4.3. I'll look around some more to see if there's anything obvious. BTW, the tclconfig directory seems to be missing from the trunk.

  • Don Porter Don Porter posted a comment on ticket #271

    ok, now synced.

  • Don Porter Don Porter posted a comment on ticket #271

    Improvement committed to trunk. See what you think.

  • Don Porter Don Porter posted a comment on ticket #271

    Guess we had the same plans for a Sunday afternoon. Will tackle this soon.

  • Don Porter Don Porter modified ticket #271

    Object creation/deletion speed and memory usage

  • Don Porter Don Porter posted a comment on ticket #271

    Well this may not be too bad. The line that creates the trouble is: https://core.tcl.tk/itcl/artifact/cf873c608adaa772?ln=272 Itcl_PreserveData() is crude and inefficient. It needs replacing with an appropriate refcounting scheme directly on the ioPtr argument.

  • Tim Tomkinson Tim Tomkinson posted a comment on ticket #271

    It looks like the problem is in the Itcl_PreserveData() and Itcl_ReleaseData() functions in generic/itclUtil.c, which in turn call Tcl_Preserve() and Tcl_Release(). These functions use a linear search, which is why the time is increasing linearly. The Tcl documentation even states, "The mechanism is intended only for short-term use (i.e. while procedures are pending on the stack); it will not work efficiently as a mechanism for long-term reference counts." Itcl 3.4 uses a hash table implementation,...

  • Don Porter Don Porter posted a comment on ticket #271

    On 10/27/2017 11:19 AM, Tim Tomkinson wrote: This is still a problem with Itcl 4.1.0. Itcl 3.4's object creation time is constant at about 2 µs, while Itcl 4.1.0's time increases linearly (see attachments). Is this going to be too difficult to fix based on Itcl 4's internal design? Looks like object creation must still be doing something linear in the number of existing objects. Any idea what that is? -- | Don Porter Applied and Computational Mathematics Division | | donald.porter@nist.gov Information...

  • Tim Tomkinson Tim Tomkinson posted a comment on ticket #271

    This is still a problem with Itcl 4.1.0. Itcl 3.4's object creation time is constant at about 2 µs, while Itcl 4.1.0's time increases linearly (see attachments). Is this going to be too difficult to fix based on Itcl 4's internal design?

  • Tim Tomkinson Tim Tomkinson posted a comment on ticket #278

    Thanks for the quick response!

  • Don Porter Don Porter modified ticket #278

    "is object -class" fails in namespace

  • Don Porter Don Porter posted a comment on ticket #278

    Fixed for Itcl 4.1.1

  • Don Porter Don Porter posted a comment on ticket #278

    Confirmed. Appears this has never worked in the Itcl 4 development series.

  • Tim Tomkinson Tim Tomkinson created ticket #278

    "is object -class" fails in namespace

  • Don Porter Don Porter modified ticket #114

    iwidgets fails for TCL 6.4.5

  • Don Porter Don Porter posted a comment on ticket #117

    I am sorry to report that my builds of all those packages on an OSX Sierra system do not demonstrate a crash on the submitted script. If you can supply more information, I can try again, but if I cannot reproduce the trouble I cannot really begin to chase down what might be the problem.

  • Pan Chai Pan Chai posted a comment on ticket #117

    Don, As I indicated in the bug report, this issue only happens in Mac OS X (not in Linux nor Cgywin.) And the script does not crash every time, only randomly but quite often (mostly 7 out of 10.) From my own testing, I would suggest the possibility of issue between itk 4.1.0 and TK 8.6.6 (I had reported one earlier, #115.) I can try to upgrade TK to 8.6.7 or downgrade itk to 4.0.6 as you suggested to see if it helps. However, in a broader sense, since using Tcl/Tk is not limited to one specific project...

  • Don Porter Don Porter posted a comment on ticket #117

    Thank you for a good report. The demo script seems to work fine on a linux system. I will try on an OS X system later when I am on one. Perhaps next week. My underinformed guess at this point is you've run into some platform-specific trouble in Itk 4.1.0. or possibly Tk 8.6.6. If you have time to blindly try things, you might look into using Tcl/Tk 8.6.7 and/or Itcl/Itk 4.0.6. Will be able to give better answers after I reproduce the trouble. Should I expect a crash each time?

  • Pan Chai Pan Chai created ticket #117

    Mac OS X: random crashes of wish (tcl/tk 8.6.6) using Iwidgets (4.1.0) radiobox class

  • Don Porter Don Porter modified ticket #116

    iwidgets 4.1.0 configure error in line 6515

  • Thomas Perschak Thomas Perschak posted a comment on ticket #116

    This fixed the issue. thx!

1 >