Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Why, in TCL 8.6, text widget has undo mechanism ebaled by default?

56 views
Skip to first unread message

tyz...@gmail.com

unread,
May 23, 2018, 9:10:18 AM5/23/18
to
Hi,
I think this is my first post here. So, I'd like to present myself.
I'm big fun of TCL/TK. I've been working with TCL since 2005 in one of the automotive company in test department. TCL and TK is one of most important languages. I'm using TCL for simple jobs as well as more complex tests in Windows, FreeBSD, CentOS where TCL uses such technologies like SQL, RabbitMQ, win32api, BSD, HTTP, REST, JSON, and more.


Anyhow, in last days I got information there is problem with one of the TK application. The newest version written in 8.6.6 consumes a lot of memory, too much ~1GB after 16h of work. The same application consumes 60-70MB in TCL/TK 8.5.15. Why??

To make this story short - after 2 days of debugging I finally fond the issue.

By default in TCL/Tk 8.6.x text widget has UNDO mechanism enabled, in TCL/TK 8.5.x not!! Undo mechanism does not have any limits (why?).

Even if I delete everything from text widgets, the data still stays in memory. So, without calling "edit undo reset" and without knowledge how undo works we have memory leak.

The application which I'm writing has log window (text widget) which is heavy used. Also build-in wish console use the same text widgets. It took me a lot of time to find it.
I search release log, wiki.tcl.tk and this group and find nothing about change of default behavior of text widget.

To summarize - I'm voting to disable the undo mechanism by default in next release.
1. In my case, it would save a lot of time
2. Undo without limitation = memory leak if don't know how undo works (which is normal at the beginning)

Anyway - maybe someone had good reason to make such change?

Thanks,
/TT

Harald Oehlmann

unread,
May 23, 2018, 9:40:52 AM5/23/18
to
Hi Tytio T.,

thank you for the message and welcome.

I propose to file a ticket at the tk issue tracker:

core.tcl.tk/tk

You have to log in as anonymous or better create an account.

Thank you,
Harald

nemethi

unread,
May 23, 2018, 12:12:44 PM5/23/18
to
Am 23.05.2018 um 15:10 schrieb tyz...@gmail.com:
The only Tk version having -undo 1 per default for the text widget was
8.6.6. In Tk 8.6.7 and 8.6.8 the default value is 0 again.

--
Csaba Nemethi http://www.nemethi.de mailto:csaba....@t-online.de

Harald Oehlmann

unread,
May 23, 2018, 12:17:26 PM5/23/18
to
Thanks Csaba,
great info !
Thanks,
Harald

tyz...@gmail.com

unread,
May 23, 2018, 3:51:21 PM5/23/18
to
Thanks, great news.
I've just checked this in Tk 8.6.8 and indeed is set to 0.

/TT

Francois Vogel

unread,
May 23, 2018, 4:35:21 PM5/23/18
to
Le 23/05/2018 à 18:12, nemethi a écrit :
> Am 23.05.2018 um 15:10 schrieb tyz...@gmail.com:
>> By default in TCL/Tk 8.6.x text widget has UNDO mechanism enabled, in
>> TCL/TK 8.5.x not!! Undo mechanism does not have any limits (why?).
>
> The only Tk version having -undo 1 per default for the text widget was
> 8.6.6.  In Tk 8.6.7 and 8.6.8 the default value is 0 again.

Correct. That change slipped in 8.6.6 unintentionally.

See https://core.tcl.tk/tk/tktview?name=967f69e7b9

F.
0 new messages