Slow performance with many markers
See original GitHub issueI have a dataset of about 10,000 markers. I am seeing unacceptable performance in all browsers.
Adding all the markers to the MarkerClusterGroup
layer only takes about 100-200ms in all browsers, but adding the layer to the map itself takes about 7 seconds in Firefox 25. In Chrome, about 2 seconds. In Safari, about 4 seconds. I suspect IE would be much worse.
Also, it’s fairly slow when navigating. Very fast when zoomed way out, but closer to the city level, zooming and having the map repaint takes 1-2 seconds. Chrome is a bit smoother than FF/Safari.
I am seeing the same loading issue with the marker-clustering-realworld.10000.html
example. The page takes several seconds to load. That demo seems to be a bit smoother to navigate, however, most likely because the data is less spread out.
Here is my marker data.
Issue Analytics
- State:
- Created 10 years ago
- Comments:8 (3 by maintainers)
Top GitHub Comments
Just a quick one for now: One thing you can do to improve scrolling is to reduce the visible markers to just what is on screen:
By default we add markers/clusters for the visible screen + a screen worth on each side. This reduces it to just the visible screen (this happens on mobile by default, so should be no difference there)
Or you could increase maxClusterRadius so less clusters are created.