Bug 322783

Summary: Optimise PlacemarkLayout
Product: [Applications] marble Reporter: Thibaut Gridel <tgridel>
Component: generalAssignee: Thibaut Gridel <tgridel>
Status: RESOLVED FIXED    
Severity: task    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Thibaut Gridel 2013-07-24 19:35:24 UTC
The night sky map has an interesting performance challenge for PlacemarkLayout:
It renders far more point placemarks with a symbol and no label. The current implementation is
too slow (as shown running marble --runtimeTrace).

The task consists in identifying the bottleneck among:
- layout calculus (less probable)
- cache handling of VisiblePlacemarks
- drawing of placemarks and labels

and then optimise this case to achieve best performance.

Reproducible: Always

Actual Results:  
about 350ms to render the Placemarks layer at zoom level 1 for 1100 placemarks of the 9300

Expected Results:  
minimal time
Comment 1 Thibaut Gridel 2013-07-31 22:34:25 UTC
Git commit b532c4bbb057d9120f94205bff5605c6535230c5 by Thibaut Gridel.
Committed on 31/07/2013 at 22:33.
Pushed by tgridel into branch 'master'.

PlacemarkLayout: optimise for label-less placemarks

roomForLabel is indeed the culprit:
- it didn't scale as it wrongly iterated all placemarks
- it isn't needed once we know a placemark doesn't have text

M  +19   -14   src/lib/PlacemarkLayout.cpp

http://commits.kde.org/marble/b532c4bbb057d9120f94205bff5605c6535230c5