Skip to content

IDLE: In the shell, when a long line of output is written progressively, there is a big delay #96560

Open
@taleinat

Description

@taleinat

I'm splitting this issue out of the discussion for issue #42973. Specifically, this comment by @mlouielu mentions:

Besides warping text, there has a performance issue inside the RPCServer and Client.

The (console, write, (text, file), {}) command is sent by server asynccall->putmessage. It should be sent by chunk size to client, and render on IDLE shell.

The result is performed as sent by chunk size, but the client will gather all chunk until it receives all data, then render on IDLE shell.

This cause the shell seems like hanging there, and doing nothing (in REPL, it will output the long string to stdout and so on).

We can manually detect this then manully chunk out (console, write, args, kwargs) command's args size, so that it will look like not hanging there.

The attach patch is a PoC about this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    performancePerformance or resource usagetopic-IDLEtype-bugAn unexpected behavior, bug, or error

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions