-
Notifications
You must be signed in to change notification settings - Fork 633
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
Latency using markercluster with 15K points #371
Comments
Hi, |
Thanks for the suggestion. |
paging the display..don't display all at one time.. |
You can try disabling the watches on individual markers. The syntax is like:
Also, I think some events currently cannot be disabled from the directive, so even tough you disabled some, it's still broadcasting other events that you probably don't need. You would need to either remove them manually from the code or implement this feature |
Also you can disable marker events, not noly map events. |
For me it was a pretty good performance boost just to switch from "broadcast" to "emit" in the: |
I've changed the broadcast to emit and also the biggest bottleneck was a watch on the markers array, I changed this logic and seems to be much better. |
Is there something else going on here? I only have about 200 markers and basically zero other logic and I see a massive performance difference between this directive and handwritten JS. Here is the original of my app: http://john.bitsurge.net/bikeracks/ http://github.com/johntyree/bikeracks Obviously there's some refactoring to be done but that shouldn't affect anything. |
Possibly related (for my problem at least) is #473. Presumably leaflet is optimized for mobile viewing. leaflet-directive is not doing it for whatever reason. |
@cachiconato's solution worked for me. I think that these tweaks should be applied to the examples with many markers, because they are quite sluggish even on desktop browsers. |
I'll send a pull request soon with my changes. |
Fantastic changes @cachiconato, please send the PR whenever you want. I have applied your optimizations to the markers-clustering-10000.html example: http://tombatossals.github.io/angular-leaflet-directive/examples/markers-clustering-10000.html |
This issue was moved to angular-ui/ui-leaflet#19 |
I'm going to rework&redesign angular-leaflet-directive to be compatible with Leaflet v1.0. It will mantain almost all its functionality, and will be compatible with the current features of the directive, but I must start from a fresh point, so I'm going to close this issue. If you think it must be worked with the new version, please reopen it. |
I'm having a problem clustering a large number of points (my current set is 40K+ points, but I've even gone down to about 15K points). It takes very long to cluster, and then when zooming in/out it takes similar time for the layer to render. Most of the time the browser (in my case Chrome) asks to kill the tab.
I should add that to overcome this, I had decided to show the data as a heat map until a zoom level is reached, after which I thought I could show the cluster, but that didn't seem to help either and resulted in the same delay.
These are my layerOptions:
layerOptions: {
"chunkedLoading": true,
"showCoverageOnHover": false,
"removeOutsideVisibleBounds": true,
"chunkProgress": updateProgressBar
}
I see that there's a leafletjs example that clusters 50K points pretty gracefully:
http://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-realworld.50000.html
Here's a fiddle demonstrating the behavior:
http://jsfiddle.net/redgis/BLW4p/
The text was updated successfully, but these errors were encountered: