classification
Title: IDLE/Tkinter: edit win stops updating when tooltip is active
Type: behavior Stage: patch review
Components: IDLE, Tkinter Versions: Python 3.3, Python 3.2, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: kbk Nosy List: ajaksu2, gpolo, kbk, ned.deily, pyJohn, serwy
Priority: high Keywords: patch

Created on 2009-02-11 19:58 by pyJohn, last changed 2011-10-31 07:00 by ned.deily.

Files
File name Uploaded Description Edit
CallTipWindow.diff serwy, 2009-06-11 23:13 Patch
patch5219.diff serwy, 2011-10-30 17:47
Messages (10)
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) 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 (serwy) * 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 (serwy) * 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.
History
Date User Action Args
2011-10-31 07:00:08ned.deilysetnosy: + ned.deily

messages: + msg146676
stage: needs patch -> patch review
2011-10-30 17:47:52serwysetfiles: + patch5219.diff

messages: + msg146648
2011-06-12 18:37:24terry.reedysetversions: + Python 3.3, - Python 2.6, Python 3.1
2010-05-11 20:57:34terry.reedysetversions: - Python 3.0
2009-06-11 23:13:21serwysetfiles: + CallTipWindow.diff

nosy: + serwy
messages: + msg89267

keywords: + patch
2009-05-19 04:23:05kbksetmessages: + msg88063
2009-05-19 03:29:35kbksetmessages: + msg88062
versions: + Python 2.6, Python 3.1, Python 3.2
2009-05-18 18:06:27kbksetmessages: + msg88041
2009-05-18 17:01:36kbksetstatus: pending -> open

versions: + Python 2.7
nosy: + kbk
title: IDLE: slowness, pauses enter long strings -> IDLE/Tkinter: edit win stops updating when tooltip is active
messages: + msg88039
priority: normal -> high
assignee: kbk

components: + Tkinter
type: performance -> behavior
stage: needs patch
2009-04-26 22:18:34ajaksu2setstatus: open -> pending


nosy: + ajaksu2, gpolo
messages: + msg86623
priority: normal
2009-02-12 00:51:58pyJohnsetmessages: + msg81697
2009-02-11 19:58:19pyJohncreate