-
Notifications
You must be signed in to change notification settings - Fork 65
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
<MarkerCluster>, <CustomMarker> & <InfoWindow> forces re-renders as elements change #90
Comments
On the specific issue of a large number of markers there seems to be some perf issues with |
I'm 100% sure it's not related to that (SuperClusterAlgorithm math). Every time something interacts with the Example: This is what slows it down most the time. Not the SuperClusterAlgorithm math. On the SuperClusterAlgorithm math tho, It seems that (after a certain number of markers) gets processed every time a CustomMarker renders... so even if it takes something like |
For example: |
Yeah maybe we can optimzie how |
I'll look into it also. |
Same problem here, when we have 1400 points and use MarkerCluser, map freezes for couple of seconds. |
@mkierdev you might be able to get better performance by switching to GridAlgorithm |
I confirm this issue, it especially becomes worse with a custom |
Hey all - I believe I was able to resolve the issue associated with performance of the CustomMarkerClass draw method by switching from offsetWidth & offsetHeight to a pure CSS solution using transforms. Please take a look and let me know if it satisfies the requirements. I also truthfully don't know the best way to build this repo and test in a sandbox (other than doing it locally). See here: #281 |
Very similar to issue #84 but different/might shed some light on how to fix.
The map seems to re-render on pretty much any iteration/change.
This causes the markers to re-render, and clusters to re-calculate in a loop.
Problem is, it does it even when you interact with something that does not impact it.
Example:
SuperClusterAlgorithm
loging.<InfoWindow>
outside all<CustomMarker>
, which opens when you click a<CustomMarker>
<CustomMarker>
in<MarkerCluster>
Problem:
<MarkerCluster>
will re-calculate even when you open/close the<InfoWindow>
located outside anything that should impact anything, except the .Also, if you have allot of markers, the cluster will redraw on what it seems to be every marker dom change, ending up with unresponsive browser pages, and instances where 1000 markers take 10 sec to render. (when in reality they took 0.01 sec, but re-did the math 1000 times)
The same
SuperClusterAlgorithm
from@googlemaps/markerclusterer
works with 100000 markers no problem in other projects (vue2), so that's not the issue. I'm thinking it's some reactivity/watch implementation of this library, but I'm new to vue3 so can't pinpoint it 100%Replication code:
https://stackblitz.com/edit/vitejs-vite-zwxadc?file=src%2FApp.vue
The text was updated successfully, but these errors were encountered: