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
{{ message }}
Repository navigation
perf: investigate redundant caption lookup passes during rendering #2523
At 3d19c5cfa5e636107e78adde6d55be78404d4f23, find_active_caption_segment in crates/rendering/src/layers/captions.rs searches for an active segment, then scans again for an exit animation when none is active. CaptionsLayer::prepare uses this lookup per frame.
A candidate optimization is to retain the first animation candidate while searching for an active segment. It must preserve active-over-animation priority and original segment order, including overlaps and unsorted input.
Validation needed:
Exact before/after selection equivalence, including timing boundaries.
Release benchmarks on synthetic caption lists, separating active frames, gaps and exit animations.
Reject the change if extra work on active frames outweighs the fallback savings.
This is a code-level performance hypothesis; no speedup or end-to-end playback/export improvement has been measured yet.
Activity
linear commentedon Oct 13, 2026
CAP-845
richiemcilroy commentedon Nov 4, 2026
Thanks for looking into this! Without a measured win we won't track this as an issue, but a PR with before and after numbers is welcome.