mapboxgl-powerbi icon indicating copy to clipboard operation
mapboxgl-powerbi copied to clipboard

Performance - Use `setFeatureState` for all hover/highlight interactions

Open ryanbaumann opened this issue 6 years ago • 4 comments

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

ryanbaumann avatar Feb 04 '19 16:02 ryanbaumann

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.

dpdiliberto avatar Dec 06 '19 21:12 dpdiliberto

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!

emilevanlier avatar Dec 09 '19 13:12 emilevanlier

Can you mention any expectation on when this issue will be solved?

emilevanlier avatar Jan 20 '20 15:01 emilevanlier

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.

ryanbaumann avatar Jan 21 '20 22:01 ryanbaumann