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

Đang mở
#253 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
20/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
performance

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Rust
Star
3
Fork
1
Merge trung bình
9 giờ 51 phút
Pull request đã merge (30 ngày)
310

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của codeatlasdev/atlas

Tất cả issue của codeatlasdev/atlas

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.