Skip to content
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

React.js Choropleth Hover Speed #2303

Closed
danielberkompas opened this issue Mar 21, 2016 · 6 comments
Closed

React.js Choropleth Hover Speed #2303

danielberkompas opened this issue Mar 21, 2016 · 6 comments

Comments

@danielberkompas
Copy link

mapbox-gl-js version: 0.15.0

Steps to Trigger Behavior

  1. Visit this JSFiddle: http://jsfiddle.net/vad3d1h5/8/
  2. Click through the Babel warning alert (it isn't relevant)
  3. Move your mouse over the map, observe hover effect
  4. Leave the tab open and return to it after a while
  5. Move your mouse over the map, observe hover effect even slower

Expected Behavior

When I wrap a MapboxGL map in a React component, I expect that the hover effect will occur quickly when I hover over a country or province. I also expect that the hover effect performance will remain constant.

Actual Behavior

When I wrap a MapboxGL map in a React component as shown in this JSFiddle, the hover effect starts off snappy, but degrades in performance over time.

This is particularly odd because very similar code works as expected:
https://jsfiddle.net/0Lk8awwp/1/ (Broken, shows code)
https://jsfiddle.net/Mourner/0Lk8awwp/3/ (Fixed by a Mapbox employee)

See also #2174, #2082 for earlier reports and fixes for this problem.

@lucaswoj
Copy link
Contributor

I regret that I am unable to help you with this question on our GitHub issue tracker because this is neither a feature request nor a bug report.

I am unable to reproduce the hover effect slowdown using your provided example. You have linked to a similar, more minimal example that does work as expected, leading me to believe this is a problem with your implementation.

I encourage you to post this question on StackOverflow if you need more help.

Your issues may be resolved by #2224.

@mourner
Copy link
Member

mourner commented Mar 22, 2016

@danielberkompas try the master version. If it doesn't fix the issue, try query-rendered-features-continued branch (but it breaks the API a bit — see #2224).

@jamonholmgren
Copy link

@lucaswoj Have you tried it in Chrome? It's very slow for me.

@lucaswoj
Copy link
Contributor

We have two big initiatives underway to speed up interactions like this one: #2224 and #1504.

I ❤️ appreciate ❤️ you creating this pull request and clearly articulating your difficulties but I don't see anything actionable here that isn't captured by #2224 and #1504.

@danielberkompas
Copy link
Author

@lucaswoj Fair enough. Any ETA on those initiatives?

@lucaswoj
Copy link
Contributor

#2224 and a first pass on #1504 will go out in a release in the next couple days 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants