Revision 292e303...

Go back to digest for 27th November 2011

Optimization in Educational

Bernhard Beschow committed changes in [marble] /lib:

TileLoader: don't load all available map themes into memory; don't reload changing map themes on own behalf

Currently, a TileLoader instance loads *all* available map themes into memory.
Besides consuming memory needlessly, this leads to slow startup times due to e.g. parsing and to some test cases being slow.
However, a GeoSceneDocument gets already loaded by MarbleMap/MarbleModel.
Therefore, the TileLoader in the TextureLayer could get its GeoSceneTextures from the currently loaded GeoSceneDocument instead of keeping private copies around.
This patch does exacly that.
As a result, the map appears much earlier than before, and some test cases execute virtually instantaniously.

Moreover, when the TileLoader replaced its private copies when the map themes changed on disk, it used to crash Marble, e.g. when deleting a map theme.
Therefore, this feature is now removed from the TileLoader.
It should be implemented in MarbleModel such that the whole dataset gets reloaded.

The ElevationModel now passes its GeoSceneTexture to its TileLoader instance.

File Changes

Modified 6 files
  • /lib
  •   src/ElevationModel.cpp
  •   src/MarbleMap.cpp
  •   src/TileLoader.cpp
  •   src/TileLoader.h
  •   src/layers/TextureLayer.cpp
  •   src/layers/TextureLayer.h
6 files changed in total