perf(desktop): virtualize transcript list for long sessions - #47
Merged
Conversation
Use GPUI's virtualized List for the transcript pane so only visible segment rows are laid out while scrolling. Cache pre-formatted display text on each segment to avoid re-walking every row each frame, and skip the 250ms UI repaint timer when viewing static history or idle live views. Co-authored-by: Fukaya Temma <pranc1ngpegasus@users.noreply.github.com>
GPUI list items are stacked by measured height and ignore margins between siblings. Apply the former 10px gap as top padding on a per-row wrapper instead of margin-bottom on the segment card. Co-authored-by: Fukaya Temma <pranc1ngpegasus@users.noreply.github.com>
pranc1ngpegasus
marked this pull request as ready for review
June 2, 2026 14:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
1時間程度のセッションをスクロールしたときに起きていたカクつきを、文字起こしリストの描画まわりを中心に改善しました。
変更内容
仮想スクロール(GPUI
list)Listに切り替えListState::spliceで差分同期し、全件リセットを避ける表示テキストのキャッシュ
Segment::display_textに句点改行済みテキストを保持し、履歴閲覧時に全行へbreak_on_sentence_endを毎フレーム適用しない不要な再描画の抑制
cx.notify()するセグメント間の余白(追記)
padding-topで復元(listは兄弟要素のmarginをレイアウト高さに含めないため)その他
anyチェックに変更follow_transcriptフラグで制御テスト
cargo check -p wisp-desktop(Linux 上でコンパイル確認)cargo test --workspace --exclude wisp-desktopneeds_live_ui_tickのユニットテストを追加macOS 実機でのスクロール体感・セグメント間隔の確認を推奨します。