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

Compute label position in map/coordinate space rather than pixel space #1641

Merged
merged 2 commits into from
Sep 7, 2023

Conversation

ignatz
Copy link
Contributor

@ignatz ignatz commented Sep 6, 2023

Computing polylabel positions is insanely expensive eating up some 70% of my UI thread render times.

Screenshot from 2023-09-06 17-41-02

Computing polylabel positions is insanely expensive eating up some 70% of my UI thread render times.
@ignatz ignatz changed the title Compute polylabel label position in map-space rather than pixel space. Compute label position in map-space rather than pixel space. Sep 6, 2023
Copy link
Collaborator

@TesteurManiak TesteurManiak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I'm wondering if we should consider spawning an isolate to compute all label positions in one go to further improve performances 🤔

@ignatz
Copy link
Contributor Author

ignatz commented Sep 7, 2023 via email

Copy link
Member

@JaffaKetchup JaffaKetchup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I think using Isolates would be too complex for now.

@JaffaKetchup JaffaKetchup changed the title Compute label position in map-space rather than pixel space. Compute label position in map/coordinate space rather than pixel space Sep 7, 2023
@JaffaKetchup JaffaKetchup merged commit f73a2e3 into fleaflet:master Sep 7, 2023
6 checks passed
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