Terminal engine: single pass over PTY bytes before the parser

オープン
#252 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust
領域
performance

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Rust
スター
3
フォーク
1
平均マージ
9時間 51分
マージ済み PR(30日)
310

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

codeatlasdev/atlas のほかの issue

codeatlasdev/atlas の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。