Figure: Diagnostic workflow: Profile first-use work → Separate creation/shaders → Prepare measured bottlenecks
Figure: Diagnostic workflow: Profile first-use work → Separate creation/shaders → Prepare measured bottlenecks

Cause and mechanism

If a Timeline effect stalls only on its first appearance, investigate work needed before it can play: asset loading, object creation, GPU program preparation, and building the PlayableGraph, the connected playback operations. Measure these separately. Particle Prewarm advances the simulation beforehand; Shader Warmup prepares shader programs.

Check and correct the setup

  1. Compare first and second playback markers on hardware.
    Inspect transition / overlap
    Inspect transition / overlap
  2. Prepare assets and required variants during loading; a variant collection does not guarantee every GPU pipeline is fully prepared on every API.
    Inspect transition / overlap
    Inspect transition / overlap
  3. Run necessary particle preparation before presentation; check Timeline reinitialization and event side effects.
    Inspect transition / overlap
    Inspect transition / overlap

Limits and verification

Offscreen playback may not prepare GPU work if culled. Measure the first actual visible presentation after warmup.

A focused diagnostic setup

Compare first and second playback after Player startup, distinguishing scene restart from preloaded assets.

Test in this order

  1. Locate graph creation, spawning, particle simulation and rendering preparation in the slow frame.
    Inspect transition / overlap
    Inspect transition / overlap
  2. Compare asset preloading separately from particle prewarm.
    Inspect transition / overlap
    Inspect transition / overlap
  3. Measure the first genuinely visible frame rather than assuming offscreen playback completed GPU preparation.
    Inspect transition / overlap
    Inspect transition / overlap

Interpret the result

Improvement only without prewarm suggests simulation cost; improvement after asset preparation suggests loading/first-use work. Check for unintended signals/gameplay during warmup playback.

Related explanations

References