Terminal engine: decouple PTY read from parse (gather ring + parse thread)

Aperta
#253 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
20/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
performance

Direzione di ricerca

Start by reading term/lifecycle.rs::spawn_reader, where the 64 KiB read and synchronous vt.feed call happen, alongside discussion #237 and the ghostty-org/ghostty#13209 change it points to. First task is measurement, not code: run the #239 harness as a baseline and capture pty read sizes per OS with strace (Linux) or dtrace (macOS). Done means end-to-end throughput improves on the harness with unchanged key-to-pixel latency, which requires designing the ring of 4 buffers and the parse thread under the VT lock — this is design work, not a starter edit.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: terminal priority: 2 normal status: confirmed type: feature

Research: discussion #237 (Linux/engine comment). Applies to macOS, Windows and Linux (shared atlas-term). Measure with the #239 harness before and after.

Problem (read in code)

term/lifecycle.rs::spawn_reader reads 64 KiB and calls vt.feed synchronously on the async runtime worker; while it parses, the program can block on a full pty queue.

Change

Copy the structure of ghostty-org/ghostty#13209: a blocking reader filling a ring of 4 buffers and a parse thread that feeds under the VT lock; deliver the first short read at once so typing latency does not change.

Evidence

Ghostty: +25–55% end to end on macOS (M4 Max), part of it from the macOS 1 KiB pty read cap [their measurement]. On Linux only one user's run; read sizes there are not established.

Done when

Measured first (pty read sizes per OS, strace/dtrace); then end-to-end throughput up on #239 with unchanged key-to-pixel latency.

Lingua principale
Rust
Stelle
3
Fork
1
Merge medio
9h 51m
PR unite (30g)
310

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di codeatlasdev/atlas

Tutte le issue di codeatlasdev/atlas

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.