You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
viewport.Model.SetContentLines receives the whole rendered transcript on each viewport replacement. Even when mecatui's renderer reuses cached block output, Bubble Tea scans every supplied line for embedded newlines and recomputes longest display width across the full transcript. This is O(total rendered characters) per replacement on the newline-free path.
Long transcripts can therefore make scrolling slow, especially with an active selection, where selection projection causes additional viewport content replacement.
Scope
Profile the full mecatui render → viewport replacement path on long transcripts, separately attributing:
block/frame rendering and provenance assembly;
viewport.Model.SetContentLines newline scan and width measurement;
scroll, resize, streaming update, and active-selection paths;
allocations, CPU, and RSS.
If viewport replacement dominates, design and evaluate a virtualized/incremental viewport that retains the full logical frame/provenance in mecatui while supplying Bubble Tea only visible rows plus bounded overscan. Preserve logical anchors, tail-follow, selection, resize behavior, and newline-free row invariants.
Non-goals
Do not preemptively introduce virtualization without profile evidence.
Do not weaken logical selection or anchor correctness.
Do not change protocol/session persistence; this is a mecatui-local performance investigation.
Acceptance
Reproducible benchmark/profile evidence identifies the dominant cost on a long transcript.
The issue records whether virtualization is justified and, if so, a bounded implementation plan with correctness/performance tests.
Activity