Terminal engine: single pass over PTY bytes before the parser

Aberta
#252 2 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
30/100
Tipo de issue
Refatoração
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
rust
Domínio
performance

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Rust
Estrelas
3
Forks
1
Merge médio
9h 51min
PRs com merge (30d)
310

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de codeatlasdev/atlas

Todas as issues de codeatlasdev/atlas

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.