[Marble-devel] Performance issues adding placemarks to MarbleWidget

Martin Engelmann murphi.oss at googlemail.com
Thu Nov 22 13:01:50 UTC 2012


Hello Dennis,

thank you for your answer.


> For testing (I wouldn't recommend this as a general solution) you can
> call something like (see also [1])
> 
> marbleWidget->model()->treeModel()->blockSignals(true);
> // repopulate map
> marbleWidget->model()->treeModel()->blockSignals(false);
> marbleWidget->model()->treeModel()->update();

When I block the signals from the GeoDataTreeModel the application crashes 
when the map is repainted the next time. I suppose blocking the signals leads 
to some dangling pointers inside the marble library.


Derived from your idea of using a GeoDataDocument to collect more placemarks I 
know create a GeoDataFolder each time I add placemarks to the map. These 
folders are children of a GeoDataDocument. This enables me to remove all 
placemarks from the map efficently.


This design works well if a lot of placemarks are added to the map or all are 
removed. To remove placemarks I call GeoDataTreeModel::removeFeature for each 
placemark. This also leads to repainting the map and is therefore quite slow.
When there are more than about 10 placemarks to remove it is more efficient to 
remove them all (by removing the GeoDataDocument) and add them all again.
However, removing more than one placemark at a time is uncommon in the 
application.

Regards,
Martin


More information about the Marble-devel mailing list