Issue 5219: IDLE/Tkinter: edit win stops updating when tooltip is active (original) (raw)

Created on 2009-02-11 19:58 by pyJohn, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
CallTipWindow.diff roger.serwy,2009-06-11 23:13 Patch
patch5219.diff roger.serwy,2011-10-30 17:47
Messages (15)
msg81662 - (view) Author: John DeLuca (pyJohn) Date: 2009-02-11 19:58
In Interpreted Mode, when enter long strings, such as ofile.write (" this is a long string...") or print ("this is a long string..."), the keyboard entry is delayed - sometimes for 20+ seconds. If one completes the string (typing blindly as not text is visible) and keys the closing ')', or one moves the entire shell window, the missing text is dropped on the entry line and one can continue typing. This occurs after about 25 characters of the string.
msg81697 - (view) Author: John DeLuca (pyJohn) Date: 2009-02-12 00:51
(pyJohn)... additional information since this is a performance issue: Lenovo s10; Win XP; 1GB; Intel Atom 1.66 Mhz
msg86623 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-04-26 22:18
I think this is a duplicate of issue 1529353.
msg88039 - (view) Author: Kurt B. Kaiser (kbk) * (Python committer) Date: 2009-05-18 17:01
Not issue 1529353. Edit window stops updating after about 60 keystrokes when a tooltip window is active. 1. Strings not necessary. Only occurs when a tooltip is active. For example, if rz is undefined, entering rz( followed by a long key sequence won't raise the bug. 2. When the tooltip window closes, the hidden keystrokes appear. This can be triggered by moving the edit window or clicking somewhere. Once the tooltip window has closed, things act normally again. 3. Remarkably, one can autorepeat, say, five lines of 'i' with no problem. Then enter another 50 - 60 'i' individually, and the bug exhibits. I thought that typematic processing took place at the keyboard driver level, so that Tk would get passed the equivalent of single keystrokes. This bug would be annnoying when entering long parameter tuples, e.g. when doing GUI coding. I'm running Tk 8.5 on WinXP at the moment. I'm guessing that this is a Tk bug.
msg88041 - (view) Author: Kurt B. Kaiser (kbk) * (Python committer) Date: 2009-05-18 18:06
As a workaround, if you need the tooltip, select Edit / Show Calltip from the menu or use the hotkey to 'reopen' the tooltip. That will get you another 60 characters. Otherwise, just hit esc to close the tooltip and your keystrokes will appear.
msg88062 - (view) Author: Kurt B. Kaiser (kbk) * (Python committer) Date: 2009-05-19 03:29
Occurs with and w/o the subprocess, but sooner (fewer char) with the subprocess. If the MultiCall wrapper on the EditorWindow Text widget is disabled, the bug disappears.
msg88063 - (view) Author: Kurt B. Kaiser (kbk) * (Python committer) Date: 2009-05-19 04:23
Bug exhibits on Linux with Tk 8.4, but requires a couple hundred characters to show up. Also goes away if MultiCall is disabled.
msg89267 - (view) Author: Roger Serwy (roger.serwy) * (Python committer) Date: 2009-06-11 23:13
I've uploaded a patch to solve the problem. In CallTipWindow.py, the showtip function binds key releases and button releases to the checkhide_event function. The checkhide_event function creates a .after callback to itself whenever it's called. Each key release adds to a cascade of calls to checkhide_event which results in Tk slowing down. When checkhide_event is called from .after, the "event" argument takes its default of None. Only then should a new .after call be made.
msg146648 - (view) Author: Roger Serwy (roger.serwy) * (Python committer) Date: 2011-10-30 17:47
Attached is a patch against 3.2.2 which does proper after_cancel calls on the after calls to checkhide_event.
msg146676 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2011-10-31 07:00
I can fairly easily reproduce the hang on a current OS X system and the latest patch appears to solve the problem. Looks good to me.
msg155645 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2012-03-13 18:58
I confirm: patch5219.diff solves the problem in linux box.
msg155668 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-03-13 21:18
New changeset 505c3b7dc539 by Martin v. Löwis in branch 'default': Issue #5219: Prevent event handler cascade in IDLE. http://hg.python.org/cpython/rev/505c3b7dc539
msg155671 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-03-13 21:34
New changeset 7e79dbceb039 by Martin v. Löwis in branch '3.2': Issue #5219: Prevent event handler cascade in IDLE. http://hg.python.org/cpython/rev/7e79dbceb039
msg155674 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-03-13 21:46
New changeset af1f8adc913b by Martin v. Löwis in branch '2.7': Issue #5219: Prevent event handler cascade in IDLE. http://hg.python.org/cpython/rev/af1f8adc913b
msg155675 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2012-03-13 21:47
Thanks for the patch and the review.
History
Date User Action Args
2022-04-11 14:56:45 admin set github: 49469
2012-03-13 21:47:19 loewis set status: open -> closednosy: + loewismessages: + resolution: fixed
2012-03-13 21:46:36 python-dev set messages: +
2012-03-13 21:34:13 python-dev set messages: +
2012-03-13 21🔞48 python-dev set nosy: + python-devmessages: +
2012-03-13 18:58:21 asvetlov set nosy: + asvetlovmessages: +
2011-10-31 07:00:08 ned.deily set nosy: + ned.deilymessages: + stage: needs patch -> patch review
2011-10-30 17:47:52 roger.serwy set files: + patch5219.diffmessages: +
2011-06-12 18:37:24 terry.reedy set versions: + Python 3.3, - Python 2.6, Python 3.1
2010-05-11 20:57:34 terry.reedy set versions: - Python 3.0
2009-06-11 23:13:21 roger.serwy set files: + CallTipWindow.diffnosy: + roger.serwymessages: + keywords: + patch
2009-05-19 04:23:05 kbk set messages: +
2009-05-19 03:29:35 kbk set messages: + versions: + Python 2.6, Python 3.1, Python 3.2
2009-05-18 18:06:27 kbk set messages: +
2009-05-18 17:01:36 kbk set status: pending -> openassignee: kbkstage: needs patchtitle: IDLE: slowness, pauses enter long strings -> IDLE/Tkinter: edit win stops updating when tooltip is activenosy: + kbkversions: + Python 2.7messages: + priority: normal -> highcomponents: + Tkintertype: performance -> behavior
2009-04-26 22🔞34 ajaksu2 set status: open -> pendingnosy: + ajaksu2, gpolomessages: + priority: normal
2009-02-12 00:51:58 pyJohn set messages: +
2009-02-11 19:58:19 pyJohn create