Slow performance from adding a simple Rect

Hi there,

I have the HelloWorld.html page running in my web server, but as soon as I try to add even a simple Rectangle, the performance slows down to the point of being unusable. It slows down the entire system. Somehow the LotsOfSatellites page works just fine though despite having so much going on.

What am I doing wrong?


What OS and browser are you running? Are they up-to-date? Are your drivers up-to-date?

LotsOfSatellites is using an older version of Cesium so it is possible that something in the current version is forcing software rendering, which is sometimes fixed by using the latest browser and GPU driver.


I'm using Windows 7 64-bit and the most recent version of Chrome. I updated my graphics drivers and that seemed to help a bit, but I'm still experiencing noticeable lag.

I have the same issue on Mac OS X Mavericks 10.9.2 on a MacBookPro Retina. Happens in both Chrome (v34.0.1847.131) and Firefox (v29). Seems worse in Firefox even. It makes my entire system crawl. This is all that is in the HelloWorld page:

var widget = new Cesium.CesiumWidget('cesiumContainer');
            var scene = widget.scene;

                scene.primitives.add(new Cesium.RectanglePrimitive({
                  rectangle : Cesium.Rectangle.fromDegrees(-100.0, 20.0, -90.0, 30.0),
                  material : Cesium.Material.fromType('Dot')

This is using b28 as well.


Ah, I bet this is due to the primitive being translucent. See!searchin/cesium-dev/translucency$20performance/cesium-dev/zLyvGR25Ok4/2zx58D4tAoYJ

The browser is reporting support for MRT or floating-point textures (or both) to Cesium, but using them is causing software rendering.

To workaround this, you should be able to replace Lines 36 and 39 of OIT.js with

this._translucentMRTSupport = false;

this._translucentMultipassSupport = false;

If we continue to see reports of this as new browsers and drivers come out, we’ll add this workaround to core Cesium.