[New-bugs-announce] [issue45804] IDLE - faster shell writing

Roger Serwy report at bugs.python.org
Sat Nov 13 21:48:01 EST 2021


New submission from Roger Serwy <roger.serwy at gmail.com>:

The shell provided by IDLE uses synchronous sys.stdout.write() calls between the subprocess and the front-end, leading to very slow writes. The provided patch proposes buffering the stdout/stderr streams in the subprocess and then sending a single update after 50ms. The patch also provides back pressure on the buffer so that it doesn't grow without bound.

When trying the behavior of the patch, disable the squeezer extension, or set its limit to 1000. Then in the shell, run:

    for i in range(500): print(i)

The output will instantly appear in the shell.

----------
files: idlelib_buffer_output.patch
keywords: patch
messages: 406306
nosy: roger.serwy, terry.reedy
priority: normal
severity: normal
stage: patch review
status: open
title: IDLE - faster shell writing
type: enhancement
versions: Python 3.10
Added file: https://bugs.python.org/file50438/idlelib_buffer_output.patch

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45804>
_______________________________________


More information about the New-bugs-announce mailing list