mapboxgl-powerbi
mapboxgl-powerbi copied to clipboard
Performance - Use `setFeatureState` for all hover/highlight interactions
Problem
Hover/highlight interactions with a large data source is slow, especially on IE11 and Edge.
Solution
Use setFeatureState for all hover/highlight interactions, instead of a separate highlight layer applied with setFilter().
Steps
- [ ] Update in-progress PR https://github.com/mapbox/mapboxgl-powerbi/pull/179
- [ ] Add
"generateId" : true
source option for all geojson soruce data
cc/ @samgehret
A customer is running into a performance issue (which I am able to reproduce) related to this problem. Their map uses data of country boundaries and when hovering somewhat quickly over different countries, the hover color cannot keep up and is very slow. Performance improves if you zoom in further. This fix would help to improve the performance issues they are running into.
In the Mapbox visual in Power BI the hover-function is too slow. When you hover over several countries it's too slow. My customer likes Mapbox, but if this doesn't perform well I'm afraid he wants to switch to another map-provider. So I hope you can fix this to keep my customer happy! :-)
Thanks in advance!
Can you mention any expectation on when this issue will be solved?
As of the next version of the Mapbox GL JS release (v1.7+), there will be functionality available to resolve this issue (slow hover performance) without any impact on existing customer dashboards. However there are a number of Custom Visual blockers that must be resolved before upgrading to v1.7+ - namely the updates here in release 1.6 - https://github.com/mapbox/mapboxgl-powerbi/projects/6
We do not have a timeline on when this specific hover-highlight performance issue will be addressed.