Skip to content

perf(desktop): virtualize transcript list for long sessions - #47

Merged
pranc1ngpegasus merged 2 commits into
mainfrom
cursor/transcript-scroll-perf-2999
Jun 2, 2026
Merged

perf(desktop): virtualize transcript list for long sessions#47
pranc1ngpegasus merged 2 commits into
mainfrom
cursor/transcript-scroll-perf-2999

Conversation

@pranc1ngpegasus

@pranc1ngpegasus pranc1ngpegasus commented Jun 2, 2026

Copy link
Copy Markdown
Member

概要

1時間程度のセッションをスクロールしたときに起きていたカクつきを、文字起こしリストの描画まわりを中心に改善しました。

変更内容

仮想スクロール(GPUI list

  • これまで全セグメントを毎フレーム DOM 化していたのを、表示中の行だけレイアウトする GPUI の List に切り替え
  • セグメント追加・部分更新時は ListState::splice で差分同期し、全件リセットを避ける

表示テキストのキャッシュ

  • Segment::display_text に句点改行済みテキストを保持し、履歴閲覧時に全行へ break_on_sentence_end を毎フレーム適用しない

不要な再描画の抑制

  • 250ms UI タイマーは、ライブ録音中またはアクティブな部分テキストがあるときだけ cx.notify() する
  • 履歴・ライブラリ表示中は静止画のためタイマーによる全リスト再レイアウトを止める

セグメント間の余白(追記)

  • 仮想リスト化後に消えていた行間 10px を、ラッパーの padding-top で復元(list は兄弟要素の margin をレイアウト高さに含めないため)

その他

  • コピー/エクスポートの空判定を全件フォーマットせず any チェックに変更
  • スクロール位置の自動追従は follow_transcript フラグで制御

テスト

  • cargo check -p wisp-desktop(Linux 上でコンパイル確認)
  • cargo test --workspace --exclude wisp-desktop
  • needs_live_ui_tick のユニットテストを追加

macOS 実機でのスクロール体感・セグメント間隔の確認を推奨します。

Open in Web Open in Cursor 

cursoragent and others added 2 commits June 2, 2026 13:54
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
pranc1ngpegasus marked this pull request as ready for review June 2, 2026 14:05
@cursor cursor Bot changed the title 長い文字起こしのスクロール性能を改善 perf(desktop): virtualize transcript list for long sessions Jun 2, 2026
@pranc1ngpegasus
pranc1ngpegasus merged commit 7264052 into main Jun 2, 2026
2 checks passed
@pranc1ngpegasus
pranc1ngpegasus deleted the cursor/transcript-scroll-perf-2999 branch June 2, 2026 14:06
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.

2 participants