IDLE: In the shell, when a long line of output is written progressively, there is a big delay
還沒有人認領這個 Issue。
- 主要語言
- Python
- 星號
- 77.2k
- 分支
- 36k
- PR 合併指標
- PR 指標待擷取
描述
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.
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 issue #42973 的連結討論以及 IDLE RPCServer 和 Client 對主控台寫入訊息的處理開始。重現一行逐步寫入的長行,然後驗證分塊輸出是否會逐步呈現,而不是等待所有資料到達。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- desktop
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100