-
Notifications
You must be signed in to change notification settings - Fork 237
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
Comments
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. |
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. |
@sodafago what is a large number of markers? |
@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 |
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. |
This issue was closed because it has been stalled for 5 days with no activity. |
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.
The text was updated successfully, but these errors were encountered: