-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Map stutters when using feature state data-join technique #7133
Comments
One of the issues was rebuilding the expression because they are not fully deserialized: #6255. I've left a note inline as a reminder: mapbox-gl-js/src/data/program_configuration.js Lines 443 to 445 in 103a2e7
I thought @ChrisLoer addressed this in v0.47 with #6853 |
@asheemmamoowala digging deeper into this today, I think the current implementation simply doesn't fit the use case of "set mostly static feature state for a hundred thousand features". To solve the stutter, the only approach I can think of is to broadcast all feature state changes to the workers, and then populate paint buffers of newly loaded tiles on the worker side using this feature state (instead of updating paint buffers for all features on every tile load). Does this sound feasible? |
That's what I was thinking of in opening #7122. One way around this would be to use a pull method for feature state, where |
Oh, I didn't initially understand what #7122 was about — thanks for clearing this up! I think we can close this one as duplicate and continue discussion there. |
Since the old data-join technique is currently in a heavy performance regression (#6367), we now recommend a new technique based on
setFeatureState
. However, it's not an ideal solution too because it stutters pretty badly on tile loads.Demo (courtesy of @ryanbaumann):
https://bl.ocks.org/ryanbaumann/733ba99c5ca1d9d15259081b395e4b00/414e974f854c20c263edddc6c9cc934d0956a9ac
Steps to trigger: Zoom back and forth.
Expected Behavior: Map zooms smoothly as if you never set any feature state.
Actual Behavior: Map stutters heavily.
Even if you remove
setFeatureState
on hover, the stutters are not better.@asheemmamoowala we should investigate what exactly makes it stutter so badly and try to get it to a non-feature-state level of performance. Preliminarily I see that the stutters are spent on two things (both happen on
tile.setFeatureState
when a tile is added, cached or non cached):The text was updated successfully, but these errors were encountered: