Terminal engine: single pass over PTY bytes before the parser

Offen
#252 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
30/100
Issue-Typ
Refactoring
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
rust
Bereich
performance

Rechercherichtung

Start by reading crates/atlas-term/src/vt/mod.rs where Vt::feed calls ClearScan::scan, PixelScan::scan and the shell scanner before Processor::advance; then read vt/scan.rs and vt/pixel.rs to see the per-byte loops. Run the existing split-safe tests first to establish a green baseline, then use the #239 harness on the ASCII, unicode and agent TUI corpora to record parse-only MB/s before changing anything. Done means those numbers improve with no behaviour change and the split-safe tests still passing.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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)

Vt::feed (crates/atlas-term/src/vt/mod.rs) scans every chunk with ClearScan::scan (vt/scan.rs, a per-byte loop) and feed_part with PixelScan::scan (vt/pixel.rs, per-byte match) and the shell scanner before Processor::advance. Only the shell scanner (SeqScan) jumps to the next ESC.

Change

Enter these state machines only at ESC (memchr), or merge them into one pass. The split-safe tests already exist and must stay green.

Why

Ghostty found 9–25% of parse time in short-run setup and scanning (ghostty-org/ghostty#13226) [their measurement].

Done when

Parse-only MB/s up on the #239 corpora (ASCII, unicode, agent TUI capture), no behaviour change.

Vorherrschende Sprache
Rust
Sterne
3
Forks
1
Ø Merge
9 Std. 51 Min.
Gemergte PRs (30 T.)
310

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus codeatlasdev/atlas

Alle Issues in codeatlasdev/atlas

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.