CesiumGS/cesium
View on GitHubModel animations are calculated for unavailable entities, impacting FPS
Open
#12,633 opened on May 24, 2025
good first issueonrampingtype - bug
Description
What happened?
It appears that model animations are calculated for unavailable entities and this can impact frame rate. i.e even though no entities are visible at a given point in time, the frame rate may drop to 10 FPS.
Here's a snapshot of the Edge profiler for the Sandcastle that shows the problem:
Reproduction steps
- See Sandcastle
- Set viewer.scene.debugShowFramesPerSecond = true
- Create a scene with lots of model entities that have animations, such that FPS is less than the maximum for your monitor (You may need to adjust the number of iterations in the for loop at the end of the Sandcastle)
- Set availability of entities to end at some point in the future
- Play viewer and watch FPS as time passes the availability end time. When the entities are no longer available, FPS doesn't recover even though the entities are no longer visible. E.g I only get 10 FPS when no entities are visible.
- If you set entity.show to false, then the entities do not impact frame rate
- Also, setting model.runAnimations to false should show the problem is related to animations, as the frame rate increases when the entities become unavailable
Sandcastle example
Environment
Browser: Seems worse on Edge / Chrome than Firefox CesiumJS Version: 1.129 Operating System: Windows