This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: IDLE seriously degrades during and after printing large single line strings
Type: resource usage Stage: resolved
Components: IDLE Versions:
process
Status: closed Resolution: duplicate
Dependencies: Superseder: IDLE shell window gets very slow when displaying long lines
View: 1442493
Assigned To: terry.reedy Nosy List: rhettinger, terry.reedy, tim.peters
Priority: normal Keywords:

Created on 2016-05-22 01:43 by rhettinger, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg266041 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2016-05-22 01:43
IDLE should check the size of lines in a result string before printing it.  Perhaps it should have a "..." after some user settable limit is reached.

>>> '=' * 100000            # Destroys IDLE
>>> json.load(somebigfile)  # Makes IDLE unusably sluggish

The problem only occurs when an individual line is long:

>>> s = 'some reasonable single line\n' * 1000)
>>> print(s)      # Separate lines are no problem
>>> s             # A big single line repr renders IDLE sluggish

Note, the sluggishness persists across sessions -- a "Restart Shell" doesn't help.

In my Python classes, this is a common and recurring problem that negatively impacts the learner's user experience.
msg266042 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2016-05-22 01:47
Ya, this annoyance has been there forever.  As I recall, the source of the problem is the Tk text widget (which slows horribly when displaying long lines).
History
Date User Action Args
2022-04-11 14:58:31adminsetgithub: 71269
2016-05-22 04:18:59terry.reedysetstatus: open -> closed
resolution: duplicate
superseder: IDLE shell window gets very slow when displaying long lines
stage: resolved
2016-05-22 01:47:21tim.peterssetnosy: + tim.peters
messages: + msg266042
2016-05-22 01:43:03rhettingercreate