Terry J. Reedy <[email protected]> added the comment:
IDLE uses tk/tkinter text widgets for Editor and Shell windows. A known
downside of this is that long lines, greater than about 2000 chars, slow down
scrolling. See #1442493 for instance.
Part of the Squeezer feature was meant to alleviate this by squeezing long
lines as well as many lines. This was meant to be documented but the main
sentence is garbled a bit and needs to be rewritten. Squeezer can be partly
deactivated by raising the threshhold to, for instance, 1_000_000_000.
Another feature of IDLE is that is executes user code in a separate process,
sending user code output back to the GUI process through a socket. Massive
amounts of output are noticeably slower than in the terminal/console. This can
be eliminated by starting IDLE with -n.
On my machine, 'a'*n takes about 1 second per 133_333 chars, or 12 for 1.6M.
160M would take 1200 seconds or 20 minutes. This of course, has nothing to do
with any normal use of IDLE.
Keyboard Interrupt, Ctrl-C: It is a known CPython (not IDLE) issue (discussed
on the tracker) that this does not always interrupt execution of user code.
This may depend on the OS. On my machine, I see
'a'*1_600_000 # hit ^C during 12 second wait.
[Squeezed text (20001 lines.)] Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
'a'*1_600_000
KeyboardInterrupt
This is not supposed to terminate the execution process, but merely to end
execution of the statement. A prompt for another statement should be and for
me is displayed. For me, following the above with restart Ctrl-F6 works
normally.
However, Restart during the wait, with or without ^c, puts IDLE into a
recoverable state. Since Restart during time.sleep or 'while True: pass' work,
I suspect the issue is restarting while receiving input.
----------
nosy: +taleinat
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue45381>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com