Skip to content

fix(skills): batch animation-map sampling#2339

Open
miguel-heygen wants to merge 1 commit into
mainfrom
fix/animation-map-timeout
Open

fix(skills): batch animation-map sampling#2339
miguel-heygen wants to merge 1 commit into
mainfrom
fix/animation-map-timeout

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

What

Batch each tween's animation-map seek and bbox samples into one browser evaluation instead of doing a CDP round trip plus a 100ms wall-clock sleep for every sample.

Why

A 60-second, 19-scene single-file composition timed out in the hyperframes-animation animation-map helper after both 120s and 300s, while hyperframes check and render completed successfully. The helper's runtime scaled with tweens × samples × 100ms even though HyperFrames/GSAP seeks update DOM state synchronously.

Reproduction

A generated 60-second fixture with 600 GSAP tweens and six samples per tween exceeded a 35-second timeout before this change. With batching, the same fixture completed in 4.6 seconds and emitted all 600 mapped tweens.

The reproduction initially also exposed the existing rational-FPS capture-session issue addressed separately by #2329; this PR deliberately does not duplicate that fix.

Tests

  • Added a regression test proving all requested seek samples and bbox/style measurements happen in one browser evaluation.
  • node --test skills/hyperframes-animation/scripts/animation-map-sampling.test.mjs
  • bun run test:skills — 230 passed
  • bun run lint:skills
  • Targeted oxlint and oxfmt checks
  • git diff --check

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