Performance and target FPS for applications

786 views
Skip to first unread message

Poul Sørensen

unread,
Aug 31, 2015, 3:22:06 AM8/31/15
to cesium-dev
We are working on our first cesium application for a product demo and my dev machine has some issues getting the performance that I would like and I was hoping to get some better overview over what FPS and performance one can expect from different target machines.

Is there a good performance benchmark application ? then we contribute FPS for different machines and get an overview over what kind of graphic card is a good solution to get good performance.


I am on a YOGA 2 PRO, that has a 3200x1800 resolution monitor and a onboard graphic card, not the best combi.

My application is a split screen, left being cesium and right being a html5 video player and FPS can easily drop to 3-4 FPS. The content is some simlpe czml docs with gps path that syncronize the video feed.

Are there any settings in cesium that be used to tune performance? 

Any suggestions to become better at thoubleshooting performance issues are also welcome.

Mati O

unread,
Sep 2, 2015, 4:31:59 AM9/2/15
to cesium-dev

The cost of performance is always quality, so expect 
 
you can add an FPS counter on top of cesium to measure improvements : 
viewer.scene.debugShowFramesPerSecond =true;

I'm also struggling with improving the framerate, since our machines does not have high end GPUs. From my experience these are some parameters
you can tweak to improve framerate, however it will reduce the quality of the rendering.

Disabling fxaa boosted my fps from 20 to 30 on a 1920x1080 monitor with my nvidia nvs gpu
viewer.scene.fxaa = false; //major framerate improvement

When constructing your viewer, you can pass webgl context parameters that might slightly improve framerates, I didn't noticed major improvement however

viewer =new Cesium.Viewer('container',{
 
...
 contextOptions
: {
   webgl
: {
      alpha
: false,
      depth
: true,
      stencil
: false,
      antialias
: false, // This one is the only I've modified to false from true, the rest are at default values
      premultipliedAlpha
: true,
      preserveDrawingBuffer
: false,
      failIfMajorPerformanceCaveat
: true
   
},
   allowTextureFilterAnisotropic
: false // this should improve a little bit
 
}

reference : Scene

If you want only 3D mode, you can pass 'scene3DOnly' to the viewer's constructor to save memory.

You can play with 'resolutionScale' property on the Viewer, but it will make things look pixelated on lower values.

If you want, you can get rid of the sun, stars and atmosphere - I believe it might improve slightly the framerate.

In windows I get higher FPS than on Ubuntu. This is probably due to drivers and implementation of webgl in each platform (windows's chrome uses ANGLE).
If you find some ways to improve it even more, I'll be glad to know. These are just some global settings, without going into how you manage entities/primitives - which 
might impact on perfromance.


Poul Sørensen

unread,
Sep 2, 2015, 4:38:47 AM9/2/15
to cesium-dev
Thanks. I intended to come back and update the thread my self.

You mentioned some things that I didnt find myself, but I also found that
 this.viewer.scene.globe.maximumScreenSpaceError;
is a good property to play with.

Alot of camera movement goes on in my application so atm I am trying to make a small algorithm that based on movement sets the max SSE accordingly.

Mati O

unread,
Sep 2, 2015, 6:14:38 AM9/2/15
to cesium-dev
Sounds like a good idea. Maybe if you use flyTo functions. you can set the SSE to higher, and when the promise fulfilled, set it back to original. 

something like this : 

var promise =viewer.flyTo(destination,flyParams);
var beforeFlightSSE = viewer.scene.globe.maximumScreenSpaceError; //keep before flyTo value
viewer.scene.globe.maximumScreenSpaceError = duringFlightSSE;
promise.then(function(boolResult) {
   // flyTo completed or aborted - return to original value before flight
   viewer.scene.globe.maximumScreenSpaceError =beforeFlightSSE;
}


Poul Sørensen

unread,
Sep 2, 2015, 7:15:44 AM9/2/15
to cesium-dev
Good idea, the application is following a cars movement. So I am setting it according to the cars speed and the playback speed. So if user speeds up the playback or if the car drives fast, then lower lvl tiles are used until the user lower the playback speed again. Impression sofar is that it makes the hole application work more smooth.

Poul Sørensen

unread,
Sep 4, 2015, 11:43:20 AM9/4/15
to cesium-dev
Another thing i noticed was that my FPS when browsing around is at ~30, but setting the trackedEntity on the viewer will make this drop to 4 FPS.  

Anyone else who has been working with tracking entities and has experienced similar.
Reply all
Reply to author
Forward
0 new messages