Message406306
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. |
|
Date |
User |
Action |
Args |
2021-11-14 02:48:01 | roger.serwy | set | recipients:
+ roger.serwy, terry.reedy |
2021-11-14 02:48:01 | roger.serwy | set | messageid: <1636858081.72.0.88336234035.issue45804@roundup.psfhosted.org> |
2021-11-14 02:48:01 | roger.serwy | link | issue45804 messages |
2021-11-14 02:48:00 | roger.serwy | create | |
|