CZML performance

Hello dev group,

We are trying to show a lot of rectangles with dynamic heights based on different times.

The problem is that the frame rate is around 3-5 which is very poor, compared with simple examples where is around 30fps.

I read some subjects regarding performance improvements, also the one using points, but we really want to have rectangles shown, not points or lines.

With 10-50 rectangles, works fine, but with more than 100 the FPS drops a lot.

Is anything we are missing?

Could we increase the performance somehow?

Here is the code (the complete code in the attachment) :

var viewer = new Cesium.Viewer(‘cesiumContainer’, {

scene3DOnly: true,

imageryProvider : new Cesium.MapboxImageryProvider({

mapId: ‘mapbox.light’ }),

baseLayerPicker : false,

contextOptions: {

webgl : {

 alpha : false,
 depth : true,
 stencil : false,
 antialias : false,
 premultipliedAlpha : true,
 preserveDrawingBuffer : false,
 failIfMajorPerformanceCaveat : true


allowTextureFilterAnisotropic : false


}) ;

viewer.scene.debugShowFramesPerSecond = true; = false;


viewer.scene.skyBox = undefined; = false;


viewer.scene.sun = undefined; = false;


viewer.scene.moon = undefined; = false;


viewer.scene.skyAtmosphere = undefined;

viewer.scene.fog.enabled = false;

viewer.scene.enableLighting = false;

var czml = […];

var dataSource = Cesium.CzmlDataSource.load(czml);


Thanks in advance!!!

CZML_Test.html (113 KB)


I don’t think using dynamic rectangles is the best approach here. I would recommend switching to polylines instead. They are much simpler to draw since you need it to update every frame.

That’s what Alex and Ed did for the 3D demo they put together a few years ago:

If you really did want to stick with rectangles, you could try upping the granularity or using a more simple linear interpolation. You could also try switching to a box geometry instead, that should be a little faster.



Thank you Hannah for your reply,

Much appreciated!

We will follow your suggestions (box geometry / granularity) to check the performance.

We will update this post with results after testing.