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

bug: GeoData.on_hover() freezes when updates are too frequent #1172

Open
NickCrews opened this issue Jan 18, 2024 · 0 comments
Open

bug: GeoData.on_hover() freezes when updates are too frequent #1172

NickCrews opened this issue Jan 18, 2024 · 0 comments

Comments

@NickCrews
Copy link

repro:

  1. run https://github.com/jupyter-widgets/ipyleaflet/blob/55d108be4905b76eb3247da2759f1ea7d29a871a/examples/GeoJson_EU_on_hover.ipynb
  2. drag my mouse very quickly around the map, causing the hover HTML to update very quickly. Zooming out helps force the updates to happen quicker.

If I do this for ~5 seconds, the hover display HTML freezes, and will show the stats on a random country. Panning or zooming the map does not fix this.

I'd imagine this is a performance thing, so if you have a more/less powerful box, it might be hard to reproduce. I confirmed it has to do with the frequency of updates: If I slowly move the mouse over the map, I can get several hundred updates (I monkeypatched in a little counter to show the number of updates) with no freezing. However, once I start moving the mouse quickly, I can get a freeze to happen after ~60 updates.

On this example notebook, I have to move the mouse very quickly. If that aggrsesive behavior was needed to trigger the bug, then I might say ignore it. But on the real dataset I'm using, which is larger, I don't have to move the mouse that fast to trigger this bug, and it is very likely an average user would encounter it.

I'm running this is VS Code. I looked in developer console, but found no error logs. Also looked in Output > Jupyter and nothing there either. If you point me where else to look, I can help look for logs.

Apple M1 Max
64Gb
MacOS 14.1.1
VS Code 1.85.1 from 2023-12-13

@NickCrews NickCrews changed the title bug: GeoData.on_hover() freezes on too many updates bug: GeoData.on_hover() freezes when updates are too frequent Jan 18, 2024
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

1 participant