AmonRaNet / QGeoView

QGeoView is a Qt / C ++ widget for visualizing geographic data.
GNU Lesser General Public License v3.0
149 stars 56 forks source link

Performance tuning #39

Closed AmonRaNet closed 8 months ago

AmonRaNet commented 8 months ago

Background map has biggest impact to performance because it covers whole map area all the time. QGVLayerTiles always calculates needed set of tiles for current camera state and parameters below will adjust algorithm.

TilesMarginWithZoomChange, TilesMarginNoZoomChange are defining margin around visible map area. First right after zoom change and second after map move/rotate. Bigger margin gives better feedback for user when map moved by mouse, but from other side it increases number of tiles loaded to map. Don't use values below 1.

AnimationUpdateDelayMs, CameraUpdatesDuringAnimation are defining layer behavior during animation (flyTo method). First defines time interval between camera update processing (during animation only!) and second will disable any processing during animation completely. This parameter will have large impact to performance in case f application performs many "jumps" by flyTo method. When processing is disabled or interval is very large QGV will show gray areas on missing tiles during animation.

VisibleZoomLayersBelowCurrent, VisibleZoomLayersAboveCurrent are defining number of zoom levels which layer can keep below and above current level. This is most impacting to performance parameters (especially VisibleZoomLayersBelowCurrent). By default QGVLayerTiles cleanups tiles based on tiles coverage. For example when tile below (bigger one) is fully covered by tiles above (smaller) then big one will be deleted. Or when bigger tile of current zoom level is loaded all tiles above it will be deleted. This gives nice user feedback, but can lead to high load on scene, especially when network had low latency and tiles from low levels are consistently upscaled. VisibleZoomLayersBelowCurrent, VisibleZoomLayersAboveCurrent are limiting QGVLayerTiles to keep only given number of zoom levels above or below current one. When is equals to 0 then only current level is allowed.