-
Notifications
You must be signed in to change notification settings - Fork 91
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
Performance degradation with large datasets #417
Comments
I believe this is because this newer @googlemaps/markerclusterer implements the clusters using |
We are experiencing the same performance issue working with a dataset of 47000+ markers. Especially when zooming in the amount of clusters is making the page crash to the point the browser gives a notice the page is unresponsive. If I try with a set of 100 markers it works pretty fluent. |
It is unfortunate that Marker objects were used as input to most clusterer solutions offered. A simple object containing a latitude, longitude and data key would cut down significantly on memory usage and would also boost performance. |
now how to fix? I have the same problem |
@zsz-danzi See #640 |
Would any of you be able to try out 2.2.0-beta.2? It removes re-rendering of individual markers on zoom change, which should help performance. It's a first step. Also still looking at #640 |
@vicb noted in #640 (comment) that the cause of this performance degradation is actually the use of "legacy markers" and that using the newer "advanced markers" resolves this issue. None of the markerclusterer documentation mentions advanced markers (yet) so I had never considered them, but they do fix the issue I was having without introducing the flicker that you see in #640 so it might be a better overall solution. |
Hi! After replacing @googlemaps/js-markerclustererplus we have noticed a massive slowdown when it comes to rendering and re-rendering marker clusters. This issue appears when there are more than 10k markers. With
@googlemaps/js-markerclustererplus
we were able to support up to 100k markers (I assume the older version calculated and rendered the markers within the viewport only).Steps to reproduce
MarkerClusterer gif (based on default example https://github.com/googlemaps/js-markerclusterer/blob/main/examples/defaults.ts):

NOTE:
Using ScreenToGif which slows it down even more.
The text was updated successfully, but these errors were encountered: