-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Improve "setFilter" performance on big GeoJSON datasets #2443
Comments
Profiled this example and the regression seems to be caused by the conversion to |
To be fair, this is 35MB of point data, quite an extreme case. While I'd like to investigate performance here, have you looked at speeding up the thing e.g. with point clustering? |
I used to cluster my map with openlayers before I knew Mapbox & your awesome perf :) but my product has to replace marine traffic app (with cluster view) which my client had a subscription for, and it's quite more impressive for them to see all of these vessels,it's like a show case when they have visitors.. They're like "Hey, see all these vessels in that area? Some are mine". |
OK, I'll see what we can do here. We probably won't be able to fully get rid of the performance hit here, but we might be able to significantly reduce it. |
I don't think this is unique to GeoJSON sources, I've noticed Mapbox Tileset sources have the same poor performance for hover interactivity when using setFilter on a hover layer. Do you need a minimal example of this too? |
Now that we have Feature State API, this is not a pressing issue, so I'm going to close for now. |
Hi,
I've been facing some performance issue since 0.16 and I can't upgrade because of that.
Please refer to my fiddles :
Map with symbols on mapbox gl js 0.15
Map with symbols on mapbox gl js 0.17
Loading is longer, as popup are on mousemove. But the biggest difference is on filter function. Performance is increased if I change symbol with circle (even if it's not my goal but it's for testing) but still 0.15 is better than 0.17.
Map with circle on mapbox gl js 0.15
Map with circle on mapbox gl js 0.17
Loading is very long because of my huge json
I need to stack filters, that's why I'm using an array with a lot of empty filters
The text was updated successfully, but these errors were encountered: