Skip to content

Answer animation variability without enumerating frames - #530

Merged
waywardmonkeys merged 2 commits into
mainfrom
perf/resolve-animation-variability
Nov 26, 2026
Merged

waywardmonkeys merged 2 commits into
mainfrom
perf/resolve-animation-variability

Conversation

@waywardmonkeys

@waywardmonkeys waywardmonkeys commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

A scene can ask whether an attribute animates before deciding which parts to evaluate each frame. For an ordinary authored attribute, the strongest value source already answers that question. Previously the query built and sorted the entire composed timeline. A skeletal animation query also enumerated frame times independently for each component.

Read ordinary opinions in strength order. Distinguish one dense sample from a composing sample, follow sparse defaults into weaker sources, and stop at blocks. Clip-backed properties still use the composed schedule, and pending clip assets still make the answer conservative. The skeletal helpers can now stop at the first varying component.

The resolve benchmark covers static attributes and series with 1 to 100,000 samples. A regression compares both variability predicates with full resolution across 729 three-opinion stacks.

Nine alternating release runs on Apple Silicon, with an already composed stage. Each skeletal scan looks up 1,000 SkelAnimation prims and calls blend_shape_weights_might_be_time_varying. The prims share a sampled weights curve. Times are medians per scan.

Samples per attribute Before After
2 0.291 ms 0.066 ms
240 3.245 ms 0.059 ms
2,400 29.683 ms 0.064 ms

On a single 100,000-sample attribute, DHAT measured 6,097,248 allocated bytes per variability query before and zero after. Timing and allocation measurements exclude stage construction.

A Boolean variability query only needs the kind of the winning source and, for a single sample, whether its value composes over weaker values. Inspect authored opinions in strength order so long animations can answer without projecting, sorting, and discarding their timelines.

Keep clip scheduling and unresolved clip demands in the decision. Compare the direct answer against full resolution across layered defaults, blocks, sparse values, and sample maps.
Joint transforms can answer as soon as one component varies. Keep frame enumeration in the sample-time accessors so polling animation never builds and discards the union of every component timeline.
@waywardmonkeys
waywardmonkeys merged commit d44789d into main Nov 26, 2026
51 of 54 checks passed
@waywardmonkeys
waywardmonkeys deleted the perf/resolve-animation-variability branch November 26, 2026 00:37
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