CesiumGS / CesiumGS/cesium

Prevent dynamic geometry update if time hasn't change

Open
#8,078 1 comment 1 reaction 0 assignees View on GitHub
category - entity type - enhancement
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

I have a 8 Polyline Entities. I'm not quite sure how many points, but probably quite a few because there are curves approximated by lines. Cesium was extremely sluggish while zooming in/out and panning around. Profiled the app and rendering is taking 250ms. I look further and see Clock.tick... I'm not advancing time, but still this is being called... look further and see Viewer_onTick->DataSourceDisplay.update->PolylineVisualizer.update->DynamicGeometryBatch.update->DynamicGeometryUpdater.update and watch as it basically destroys all my polylines... only for Scene.render to recreate them!? And, time has not changed!

Somewhere along that chain, somebody needs to check to see if time has actually changed before doing all that work.

Contributor guide

Open the contributing guide

Research direction

Start at the Viewer_onTick → DataSourceDisplay.update → PolylineVisualizer.update → DynamicGeometryBatch.update → DynamicGeometryUpdater.update chain named in the report, and reproduce the case with time not advancing. Trace where dynamic geometry is destroyed and recreated, then verify that unchanged time avoids that work while advancing time still updates the polylines.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.