[discussion] clamp to ground performance and tradeoffs


We are developing a system that contains many kinds of Entities, such as : polyline, polygons, labels, billboards etc and a lot of them.

Cesium camera is being updated ~20-30 times per second.

Currently most of the entities are clamp to ground.

I was wondering whether we can get much better performance by waiting for first the first time that globe.tilesLoaded to be true, and then set the height of each point in the polylines/polygons/labels and removing the clampToGround to false?

It is true that tiles might keep loading, and tilesLoaded changes overtime and this might cause a small error in the entity position, but I did some testing and it actually looks good.

Also, if this approach will yield better performance, why won’t we implement it within cesium? we can wait for the terrain to be fully loaded and then stop any calculation for clamp to ground entities.