Cesium Performance Issues

Hi all,

I am trying to render a decently amount of polygons (~4000) on the cesium viewer on a computer with the following specs:

CPU: Intel Xeon E5-1620 @ 3.5GHz
GPU: Nvidia GTX 950
RAM: 16GB
(Cesium is running on Chrome)

However, for some reason, I am running into performance issues when I zoom into the polygons, and ONLY when I zoom into the polygons.

If cesium is full screen, and all of the rendered polygons take up the whole screen (at a zoom level where Canada covers my whole screen), there are no performance issues. The GPU usage is about 35% and CPU is about 20%.

Now, when I zoom into the polygons (at a zoom level where about half of Vancouver Island takes up the whole screen) there is an incredible amount of lag. The GPU usage skyrockets to 98-100%, but the CPU usage stays at about 15-20%.

I have tried fiddling around with various rendering settings:

viewer.scene.fxaa = false;
viewer.scene.fxaaOrderIndependentTranslucency = false;
viewer.scene.globe.maximumScreenSpaceError = 5;
contextOptions : {
   allowTextureFilterAnisotropic : false
}

etc...

However the only setting that helps is setting the viewer.resolutionScale to 0.25, and then the zoomed-in polygons don't lag nearly as much. However, at 25% of the normal resolution, it doesn't look too great.

Based on my tests, I am led to believe that this is some sort of software bug. It doesn't make any sense to me why rendering a few zoomed in polygons would be devastatingly taxing on the GPU, as rendering a whole lot more of polygons on the screen zoomed out is not.

Does anyone have some insight as to why this is? Any help would be greatly appreciated.

Cheers,
Dima

Also, I thought I'd mention that I am using a display that has a 1920x1080 resolution.

Dima,

Can you share the code you are using to create them? Are these polygons on terrain?

I create a new GeoJsonDataSource from a GeoJson string:

polygonType.dataSource =
        new Cesium.GeoJsonDataSource({name: polygonType.name});
    polygonType.dataSource.load(
        JSON.parse(geodata))
        .then(
        function()
        {
            polygonType.update = true;
        }
    );

Then I assign materials to each entity in:

polygonType.dataSource.entitites.values

Then I add the dataSource to the viewer:

viewer.dataSources.add(polygonType.dataSource)

I create a new GeoJsonDataSource from a GeoJson string:
polygonType.dataSource =
        new Cesium.GeoJsonDataSource({name: polygonType.name});
    polygonType.dataSource.load(
        JSON.parse(geodata))
        .then(
        function()
        {
            polygonType.update = true;
        }
    );

Then I assign materials to each entity in:

polygonType.dataSource.entitites.values

Then I add the dataSource to the viewer:

viewer.dataSources.add(polygonType.dataSource)

Also, my polygons are not on terrain.