Repository navigation
Conversation
valeriangalliat
force-pushed
the
patch/volume-probe-setter-scan
branch
from
November 10, 2026 23:53
64d43d5 to
e3f030b
Compare
Pentiado
force-pushed
the
patch/volume-probe-setter-scan
branch
2 times, most recently
from
November 16, 2026 20:34
b54ec67 to
77dfc93
Compare
…review sample every clip A tween on a non-DOM object whose tweened property is a setter made the volume probe sample every media element at 60 seeks per second of clip, because a gain proxy writes volume that way. The same shape is a clock whose setter redraws a canvas from scene time, so mounting such a scene redrew it once per sample: about 1,500 redraws for a 25 s clip, all in one task. The probe now seeks once into the middle of each setter tween with every media element's volume watched, and samples only the elements a setter wrote. A gain proxy is still sampled as before; a clock costs one redraw. A tween it cannot place on the timeline, or an element it cannot watch, falls back to sampling as before.
valeriangalliat
force-pushed
the
patch/volume-probe-setter-scan
branch
from
November 25, 2026 00:56
77dfc93 to
f8df83c
Compare
This branch has not been deployed
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.
Arcade fork patch. Do not merge.
This draft shows
patch/volume-probe-setter-scanagainstmain, the upstream mirror, so the patch has one page for its diff, its revisions and its reason. Arcade's/hyperframes-updaterebases the branch ontomainand cherry-picks it ontoarcade; this PR is not part of that flow.Why
A scene that draws a canvas from scene time through a setter (
const clock = { get t(){…}, set t(v){ drawAt(v) } }, tweened by the timeline) freezes the preview for seconds while it mounts.The preview's volume probe samples a media element's window at 60 whole-timeline seeks per second unless it can rule out volume automation. Since heygen-com#4595, any tween whose non-DOM target has a setter forces that probe for every media element, because a gain proxy writes
el.volumethat way. A redraw clock has the same shape, so each probe sample is a full canvas redraw. Measured on a three-scene, 30 s film with 19 audio clips: one synchronous task of about 15 s during mount, so the page cannot answer anything until it ends. Render is unaffected (it does not live-probe).The patch keeps the gain-proxy case and drops the clock case:
volumeMoversOfrecords the setter tweens instead of a singleanySetterflag.<audio>/<video>in the document watched forvolumewrites. Only elements a setter wrote are sampled. The result is shared by the pass, like the movers index.volumecannot be watched, it falls back to sampling every element, as before.Verified
srcdociframe, headless Chromium, with thearcadebuild ± this patch. Without it: one 15.1 s long task, ready at 17.0 s. With it: longest task 196 ms, ready at 1.9–2.2 s. The film has no volume tweens, so both builds play the same audio.Upstream
Still on upstream
main(mediaVolumeEnvelope.tsis unchanged since heygen-com#5674). This looks like a stock-project bug. A public repro and an upstream issue have not been made yet.Related fork patch:
patch/volume-probe-hidden-clips(for heygen-com#7193) also editsprobeAndCacheElementVolume, wrapping the sweep. The two patches' changes tomediaVolumeEnvelope.tsmerge without conflict.Drop when
Upstream stops the setter fallback from sampling media that no setter writes.
Arcade
Listed in
scripts/arcade/patches.jsononpatch/arcade-tooling. The next/hyperframes-updatepublish carries it to the CDN runtime.