Atlaslog
Atlaslog / Field Notes / 3D & Cesium
Field note · 3D & Cesium

Frame rate drops to 18 with two thousand entities

Quick answer

500 stations stay smooth, while 2000 drag at 18 to 22 FPS. Entity properties are re-evaluated every frame, over 20000 evaluations at that count, and each Label rebuilds its own texture atlas.

Last verified 2026-11-03 · Multiple versions · Cite this page
Applies to: CesiumJS 1.121
Symptom
Checklist
  1. Comment out the Label and keep only Billboard to see whether labels or icons are the cost.
  2. Read viewer.entities.values.length to confirm entities were not added twice.
  3. Check viewer.scene.primitives.length, which should not grow by one per station.
  4. Check whether each entity gets its own ConstantProperty that could be shared.
Fix

Replace the entities with one BillboardCollection using collection.add with position, image, scale 0.8 and verticalOrigin BOTTOM, plus one LabelCollection, so 2000 points become a single primitive and a single draw call. If entities must stay, pass a plain Cartesian3 instead of a Property and keep only interactive key sites as entities.

Code
viewer.scene.debugShowFramesPerSecond = true;
// 左上角显示 18 FPS
console.log('实体数量', viewer.entities.values.length);
console.log('图元数量', viewer.scene.primitives.length);
Watch out
All 120 field notesChinese originalRunnable examples
English edition written for Atlaslog from the original Chinese field note. Code is unchanged and runs as-is.
Cite this page

Atlaslog (2026). Frame rate drops to 18 with two thousand entities. https://www.jingweizhi.com/en/cookbook/cesium-entity-drop-frame.html (accessed 2026-11-03).