Completing deterministic labels and symbols effort by Sublimis · Pull Request #1586 · mapsforge/mapsforge

added 4 commits

December 3, 2024 13:49
* Slight performance improvement when drawing labels (faster sorting)
* Slight performance improvement when drawing labels: 1) Avoid sorting when not needed: 2) Reverse order of a sorted list instead of sorting again; 3) Use List-s instead of Set-s where possible.
* Slight performance improvement when drawing labels: 1) Avoid sorting when not needed: 2) Reverse order of a sorted list instead of sorting again; 3) Use List-s instead of Set-s where possible.

devemux86

devemux86

devemux86

@Sublimis

…clashesWith() improvements!

2) Important PointTextContainer.clashesWith() improvements!

3) Important LayerUtil.collisionFreeOrdered() improvements!

The above improvements together make the following :

* Non-deterministic labels AND SYMBOLS are now history!

* Prevents labels and symbols overlap when the overlapping items are both marked as "display always"!

* Extra: Slight performance improvement when drawing labels: Avoid sorting when not needed; Reverse order of a sorted list instead of sorting again; Use List-s instead of Set-s where possible.

@Sublimis Sublimis changed the title Final details for deterministic labels Completing deterministic labels and symbols effort

Dec 4, 2024
…lementContainer.clashesWith()

2) Important improvements to PointTextContainer.clashesWith()

3) Improvements to LayerUtil.collisionFreeOrdered()

The above improvements together make non-deterministic labels and symbols a history!

* Prevent labels and symbols overlap when the overlapping items are both marked as "display always"

* Additional: Slight performance improvement when drawing labels: Avoid sorting when not needed; Reverse order of a sorted list instead of sorting again; Use List-s instead of Set-s where possible.
…lementContainer.clashesWith()

2) Important improvements to PointTextContainer.clashesWith()

3) Improvements to LayerUtil.collisionFreeOrdered()

The above improvements together make non-deterministic labels and symbols a history!

* Prevent labels and symbols overlap when the overlapping items are both marked as "display always"

* Additional: Slight performance improvement when drawing labels: Avoid sorting when not needed; Reverse order of a sorted list instead of sorting again; Use List-s instead of Set-s where possible.

@Sublimis Sublimis marked this pull request as ready for review

December 4, 2024 17:45

This was referenced

Jan 18, 2025

This was referenced

Sep 13, 2025