Skip to content

Optimize transcript rendering performance#5784

Merged
ComputelessComputer merged 2 commits into
mainfrom
fix/transcript-performance
Jun 26, 2026
Merged

Optimize transcript rendering performance#5784
ComputelessComputer merged 2 commits into
mainfrom
fix/transcript-performance

Conversation

@ComputelessComputer

@ComputelessComputer ComputelessComputer commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Reduce transcript word rerenders during playback and search.
  • Narrow transcript row subscriptions through TinyBase hooks.
  • Add focused search, segment, and transcript state coverage.

Note

Medium Risk
Touches transcript visibility, search highlighting, and store subscription patterns; behavior is covered by new tests but incorrect memo or listener wiring could cause stale UI or missed updates.

Overview
Reduces transcript UI churn during audio playback and in-transcript search, and narrows TinyBase reactivity so components don’t resubscribe to whole tables.

Transcript search match resolution in getTranscriptMatches now advances a single span cursor instead of scanning every span per hit. New unit tests cover match order, multi-word phrases, and whole-word mode.

useMainStoreRowsRevision / useStoreRowsRevision live in ~/store/tinybase/hooks and replace useTable("transcripts") in transcript state, useHasTranscript, and render-request hooks—updates depend on per-row listeners for the relevant transcript (and related) row IDs.

Search highlighting moves up the tree: SegmentsList builds TranscriptSearchRenderState from search context and passes highlights and active match into memoized WordSpan children (no per-word useSearch). SegmentRenderer’s custom memo compare uses getActiveLineIndex so playback ticks only rerender when the highlighted line changes, and skips rerenders when the active search match moves between segments that don’t contain either match id.

Reviewed by Cursor Bugbot for commit 41debd6. Bugbot is set up for automated code reviews on this repo. Configure here.

Reduce transcript word rerenders during playback/search and speed up transcript search matching.
Move row revision tracking into TinyBase hooks and avoid whole transcript table subscriptions in session transcript state.
@netlify

netlify Bot commented Jun 26, 2026

Copy link
Copy Markdown

Deploy Preview for old-char canceled.

Name Link
🔨 Latest commit 41debd6
🔍 Latest deploy log https://app.netlify.com/projects/old-char/deploys/6a3ea8840d548b000872d364

@ComputelessComputer ComputelessComputer merged commit b354725 into main Jun 26, 2026
10 checks passed
@ComputelessComputer ComputelessComputer deleted the fix/transcript-performance branch June 26, 2026 17:54
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