using the latest cesium build I have noticed slow terrain tiles download performances and I hope someone can help me.
For some reasons it seems that cesium is first downloading imageries and only after that the elevation data. Is there a way to give priority to the terrain tiles download?
My current setup has the following set of layers:
- A custom terrain of (19 levels) handled by a CesiumTerrainProvider
- A first layer based on BingMapImageryProvider
- A second layer based on WebMapServiceImageryProvider
- A third layer based on WebMapServiceImageryProvider which I am using as a mask to highlight a specific area
When I am flying (flyTo fuction) to a specific mountain on the terrain, Cesium creates a huge number of requests on the download queue, which is fine, but they are mainly imagery requests resulting in a flat terrain for several seconds (and really bad user experience) until almost all the imagery data has been downloaded. Only after that the elevations are updated. Things are getting worse if I apply a camera movement following a path around a mountain. Imagery requests never stop and the terrain elevation is never updated unless I stop the animation. I have gone through several parts of the source code trying to understand the cesium behaviour and trying to adjust parameters like:
without success. I only mitigated the requests amount during the continuous camera animation by increasing the tileCacheSize, but the terrain issue is still there. I can exclude bandwith issues as I am on a 100Mbit connection and servers are on Google cloud. From what I can understand network requests are handled by throttleRequestByServer promise which has a maximum of 6 parallel connections which are correcly executed by looking at the Google Chrome network inspector. What I would expect is to have the same number of parallel requests for each provider or at least an equal distribution of them among the avavilable slots. So here are my (more detailed) questions:
- Is there a way to tell cesium to give priority to download and visualization of elevation data?
- Is the current cesium implementation still requiring the download of all the tiles from the root to the LOD corresponding to the camera position on the map? or is cesium downloading only the visible tiles?
- Do you think that moving the terrain data on a third level domain would increase the amount of parallel requests?
- Do you recommend any DiscardPolicy to implement?
- I was considering the option to use the HTTP2 protocol. Do you think that this will increase the amount of multiple downloads? In this case should I set maximumRequestsPerServer = 1 since the multiplexing is part of the protocol?
Any suggestion is more than welcome, thanks!