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.

Author roger.serwy
Recipients ajaksu2, drhok, gpolo, josiahcarlson, kbk, rhettinger, roger.serwy, taleinat, terry.reedy
Date 2013-04-04.00:47:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1365036464.04.0.243713358333.issue1442493@psf.upfronthosting.co.za>
In-reply-to
Content
The only reason that the IDLE shell is slow is due to the shell's text widget being configured to have wrap="char". If we manually wrapped the output then the shell responds very quickly to rendering really long strings.

The attached proof-of-concept patch (against 2.7 tip) implements manual wrapping. You can type "print('a' * 10**6)" and the shell responds almost instantly when using no-subprocess mode. (The RPC overhead becomes readily apparent when using a subprocess, introducing a large uninteruptable delay. That's another issue.)

I left text wrapping enabled in the shell since the user may be using a variable-spaced font. A possible compromise would be to increase the wrap_index to a large number, like 32768, before IDLE inserts a '\n' into the output. This would mimic the wrapping behavior of the original shell, but keep the shell responsive when you write a very long string to the output.
History
Date User Action Args
2013-04-04 00:47:44roger.serwysetrecipients: + roger.serwy, rhettinger, terry.reedy, kbk, josiahcarlson, drhok, taleinat, ajaksu2, gpolo
2013-04-04 00:47:44roger.serwysetmessageid: <1365036464.04.0.243713358333.issue1442493@psf.upfronthosting.co.za>
2013-04-04 00:47:43roger.serwylinkissue1442493 messages
2013-04-04 00:47:43roger.serwycreate