-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
What happened?
Adding entities in Cesium.js using HeightReference = CLAMP_TO_GROUND is generally very costly for performance. The problem seems worse with Labels than Billboards, and strangely enough the performance decreases with not only the number of entities but primarily the length of the text labels (number of characters).
Rendering 1000 labels with 5 characters works quite well. But if I increase the number of characters to 20 or 100 the application becomes unusable. This only an issue when HeightReference is used to clamp the entities to underlying terrain.
As the letters are not individually placed relative to ground I see no reason why the number of characters should effect performance here.
Reproduction steps
- Make sure "Clamp to Ground" is active
- Enable "1000 Entities" (should work fine, 60fps)
- Enable "100 Characters" (unusable, browser hangs)
Sandcastle example
Environment
Browser: Google Chrome Version 138.0.7204.97 (Official Build) (64-bit)
CesiumJS Version: 1.131
Operating System: Windows 11