Start with the symptom
Reduce expensive browser work
- Use fewer large
backdrop-filterandfilter: blur()layers. - Avoid animating dozens of shadowed elements at once.
- Replace a static blur or texture stack with a pre-rendered image.
- Size images near their actual delivery dimensions. A very large JPEG still decodes into a very large bitmap.
- Keep work inside animation callbacks small. Do not repeatedly read layout and write styles in the same frame.
Measure instead of guessing
- Run
npx hyperframes preview. - Open Chrome DevTools and select Performance.
- Record the part that stutters.
- Inspect the longest tasks:
- Paint or Composite Layers points to filters, shadows, masks, or large layers.
- Layout or Recalculate Style points to layout work.
- Script points to author code.
Make a fast review render
If the composition is intentionally too heavy for real-time playback, review an encoded file:standard or high for delivery. Draft changes capture and encoder quality; it does not change the composition’s timing.
Tune transparent WebM only when needed
WebM uses the CPU-heavy VP9 encoder. The default is suitable for most work. To trade more encoding time for compression quality:--vp9-cpu-used accepts integers from -8 to 8; higher values are faster with a larger quality/size tradeoff.