Optimizing Cesium tile display performance

When using cesium, I found that whether it is loading earth imagery or 3dtile data, the display performance when zooming in or out is not very smooth. It sometimes takes more then a second to display the new content.
I found that if it is a gis engine with a client, this problem does not seem obvious, because many data requests happen locally. Does cesium have some offline access solutions, such as PWA, caching technology, etc., so that it can speed up the loading speed.

Hi,

There have been some discussions on this:

We have a blog post about improving performance with explicit rendering, which might contain relevant information.

Hi,
I have seen the same in my application, my approach was in two steps:

  • first make sure you’re not loading 10 different layers, as the service uses the browser’s get to fetch the maps, making it dependant on your network infrastructure, and ultimately your CPU/GPU to pile up those tiles. Personally I merged my tiles server-side to only load 1 terrain layer and 1 imagery layer.
  • second, I added local sqlite mbtiles support to the library, by overloading the requestImage method in the provider. my tiles are snappy, with around 1 to 3 ms to fetch from cache.
3 Likes

Thank you for your reply,what is the method to add local sqlite mbtile?

Sooo I forgot to add that my application is wrapped in an electron container, and this gives me access to a node server where I could require the mbtiles library available here

You then need to overwrite the requestImage method of your cesium tile provider, there you can catch the requested tile and provide it yourself through a promise. ( here https://github.com/CesiumGS/cesium/blob/1.74/Source/Scene/UrlTemplateImageryProvider.js#L761)

If you need to stay in the brower, you won’t be able to use node-mbtiles or access the local filesystem, but there are other solutions, you could look into https://developer.mozilla.org/fr/docs/Web/API/Window/localStorage I guess you’ll find what you need there.