Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(polygons): cull labels separately, and cache TextPainter #1716

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

ignatz
Copy link
Contributor

@ignatz ignatz commented Nov 3, 2023

For ease of reviewing, I pulled the "polygon label"-only changes out of #1714 AND add TextPainter caching (which is actually the biggest cost reduction)

I could also add the TextPainter caching to #1714 but maybe we don't make that one even more sprawling. I'd suggest to review this one first and then I'll update #1714 .

lib/src/layer/polygon_layer/label.dart Outdated Show resolved Hide resolved
lib/src/layer/polygon_layer/label.dart Show resolved Hide resolved
…e polygons, deriving pixel bounds from polygon's latlng bounds, and most importantly cache the TextPainter.
@JaffaKetchup JaffaKetchup changed the title Reduce the cost of polygons by culling the labels on partially visible polygons, deriving pixel bounds from polygon's latlng bounds, and most importantly cache the TextPainter perf: cull labels on partially visible polygons, and cache TextPainter Nov 3, 2023
@JaffaKetchup JaffaKetchup changed the title perf: cull labels on partially visible polygons, and cache TextPainter perf(polygons): cull labels separately, and cache TextPainter Nov 3, 2023
@JaffaKetchup JaffaKetchup merged commit 0758979 into fleaflet:master Nov 3, 2023
6 checks passed
@josxha josxha added this to the v6.1 milestone Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants