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

Slow on many markers #225

Closed
sodafago opened this issue Nov 11, 2024 · 6 comments
Closed

Slow on many markers #225

sodafago opened this issue Nov 11, 2024 · 6 comments
Labels

Comments

@sodafago
Copy link

sodafago commented Nov 11, 2024

Hello everyone! I noticed that each marker and cluster in the library is positioned separately, which makes each build stage quite expensive with a large number of markers, since with each build flutter has to rebuild the entire tree, without the ability to save some parts. I understand that most likely there are some reasons for this, perhaps it is due to animations. I want to know if there were versions in which all clusters with markers were positioned at each zoom entirely, and if not, should we add the ability to position all objects at once, to improve performance?
This will allow you not to recalculate the layer for each build, but to calculate the layers at each level in advance, and when changing the boundaries of the map, just move the entire layer. There is even a comment in the code about the performance of this place:
https://github.com/lpongetti/flutter_map_marker_cluster/blob/master/lib/src/marker_cluster_layer.dart#L597
Thanks in advance for the great library and answer!

P.S.: I will gladly participate in the development of this improvement, or even make it myself, although it may take a lot of time, but I would like to know your opinion on this issue before that.

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Dec 13, 2024
@jannisnikoy
Copy link

I've noticed since Flutter 3.27 that on Android this problem seems to have been intensified. I tried disabling Impeller, but that doesn't make a difference. Reverting back to Flutter 3.24.5 "fixes" the issue. Only in areas on the map with a lot of clusters.

@github-actions github-actions bot removed the Stale label Dec 18, 2024
@Juggler98
Copy link

@sodafago what is a large number of markers?

@sodafago
Copy link
Author

sodafago commented Dec 29, 2024

@Juggler98 for example, 50k markers, with maxClusterRadius 64. On my phone (Pixel 7) work very slow. I also use hit-testing, for catching hited markers at point

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Jan 29, 2025
Copy link

github-actions bot commented Feb 3, 2025

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this as completed Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants