Skip to content

tui: reduce transcript command highlighting work - #1

Open
grishy wants to merge 2 commits into
mainfrom
sg-tui-transcript-highlighting
Open

grishy wants to merge 2 commits into
mainfrom
sg-tui-transcript-highlighting

Conversation

@grishy

@grishy grishy commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • fall back to plain text for Bash command lines over 1 KiB while preserving the generic 4 KiB guard
  • cache syntax-highlighted ExecCell command lines across transcript renders
  • keep wrapping and live output outside the cache so resize and output updates remain current

Motivation

A macOS sample captured during Ctrl+T scrolling placed 1889 of 1962 samples in:

CellRenderable::render_scrolled -> ExecCell::transcript_lines -> syntect -> onig

The observed shell command lines were approximately 1.9-2.2 KiB, below the existing generic 4 KiB guard.

Validation

  • just test -p codex-tui - 3983 passed, 6 skipped
  • just fix -p codex-tui
  • just fmt

Limits

This is a focused mitigation for the sampled highlighting hotspot. It does not cache output wrapping or ANSI parsing, and it does not replace broader pager layout work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant