Repository navigation
perf(core): a video edit with no animation timeline stops rewriting every clip each frame - #6786
Closed
miguel-heygen wants to merge 2 commits into
Closed
miguel-heygen wants to merge 2 commits into
miguel-heygen wants to merge 2 commits into
Conversation
Contributor
Edit accuracy: accurate 271 (base branch 271), smooth 125 of thoseThe gate passes. Quarantined, measured but not gated (0) Unstable (2)
|
Contributor
There was a problem hiding this comment.
Verdict: APPROVE · 0 blocker · 0 important · 0 nits · head e0c1e238
Scope
- Read
init.tsseek path end to end:hideClipsAgain()runs before the adapters seek, so only the root and scene timelines ever read inside the reveal. With neither, the reveal had no reader, and skipping it changes no frame.sceneTimelines()filters the same way the old inline loop did. - fails without the fix: confirmed locally. Dropping
(tl || sceneTimelines().length > 0)fails onlyleaves hidden clips alone on every jump when the page has no timeline(262/263). e0c1e238vs69d05c5conly trims comments (ratchet). CI, Windows render verification, regression, Comments and edit accuracy (271 = base) are green at this head.
5 of 6 tasks
Collaborator
Author
|
Folded into #6785 with its tests and numbers, so the three preview fixes for long cut-list edits review and land as one. |
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.
What
A composition with no animation timeline, such as a long cut list of video clips, no longer rewrites every hidden clip twice on each frame of playback.
Why
On each forward seek the runtime briefly shows the hidden clips whose tweens draw for the first time, so GSAP reads their authored style, then hides them again. When the page has no captured timeline there is nothing to ask,
firstRenderedisnull, andnull?.size !== 0is true, so it took the fallback that shows every hidden clip. A 140-clip edit with no GSAP timeline removed and re-addeddata-hf-clip-hiddenon 139 clips every frame, about 33,000 attribute writes a second, each one a style invalidation on a video.Related work
None open on this path. The reveal check was last changed by #6189 and #5690.
How
The reveal now also needs a timeline that can draw: the root timeline or a registered scene timeline. The "registered timelines other than the root's" list moves into one helper that the scene seek and this check both use.
Test plan
init.test.ts: on a page with no timeline, seeks across two video clips never query[data-hf-clip-hidden].leaves hidden clips alone on every jump when the page has no timelineand nothing else.vitest run src/runtimeinpackages/core: 108 files, 2645 tests passed. oxfmt, oxlint, coretscand the comment ratchet clean.main→ this branchdata-hf-clip-hiddenwrites a secondsetPropertyself time in that profileOn this machine the freed time does not show up as smoother frames; the work goes away, and slower machines have less headroom to absorb it.