IDLE: In the shell, when a long line of output is written progressively, there is a big delay
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 77.2k
- Forks
- 36k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der verknüpften Diskussion zu Issue #42973 sowie der Verarbeitung von Konsolenschreibnachrichten durch IDLE RPCServer und Client. Gib eine lange, schrittweise geschriebene Zeile wieder und überprüfe anschließend, dass die Ausgabe der einzelnen Blöcke inkrementell dargestellt wird, anstatt auf das Eintreffen aller Daten zu warten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- desktop
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100