Revision 678698

Go back to digest for 24th June 2007

Optimization in Educational

Inge Wallin committed changes in /trunk/KDE/kdeedu/marble:

Optimize memory usage by only having QPixmaps for those PlaceMarks that are actually shown. This saves a little less than 10% of the memory used by Marble, bringing it down from 63 MB to 58 on my machine.

The saving comes from the fact that there can potentially be 100,000s of PlaceMarks, but only a few 100 of them are visible at any given time.

Details:
- Introduce a new class VisiblePlaceMark.
- Move members from PlaceMark to VisiblePlacemark
- Maintain a list of VisiblePlaceMarks.

A future improvement can be to move the list of VisiblePlaceMarks to the view, and have different lists for different views.

File Changes

Modified 8 files
  • /trunk/KDE/kdeedu/marble
  •   /ChangeLog
  •   /src/lib/MarbleModel.cpp
  •   /src/lib/MarbleWidget.cpp
  •   /src/lib/placemark.cpp
  •   /src/lib/placemark.h
  •   /src/lib/PlaceMarkContainer.h
  •   /src/lib/placemarkpainter.cpp
  •   /src/lib/placemarkpainter.h
8 files changed in total