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_
Profiled this example and the regression seems to be caused by the conversion to pbf due to the queryRenderedFeatures changes. cc @ansis Let's investigate further.
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".
I'm not criticizing your new version, but it's so frustrating to look at really good new function like queryrenderedfeature and querysourcefeature and can't be able to use them !
Anyway, I just can't go back to a clustered map
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.
Most helpful comment
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.