-
Notifications
You must be signed in to change notification settings - Fork 588
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
Vertices with attached symbol styles don't draw correctly in Mapbox V2 on iPhone. #1031
Comments
Just to prove this issue isn't due to my code, I've created a minimal subset.
Demo: Source: |
You'll note that the initial drag completes correctly and rapidly, but then a queue of outdated drag events are drawn. Which would imply that someplace in draw This issue is a showstopper for me. |
Four months later and no comments, no workarounds, and the perf issues just keep growing with the number vertices. I did some profiling and in one situation 50% of the time is spent in toGeoJSON() which is which in turn calls JSON.parse/JSON.stringify TWICE for each feature for each frame. Seems like this could be optimized by adding a "dirty" flag and only performing the conversion when the coordinates or properties actually change. Or at the very least, change line 39
to
and avoid one cycle through JSON.parse / JSON.stringify. |
It turns out that most of this problem was due to performance issues with the plugin mapbox-gl-draw-geodesic. These have now been fixed in V2.1.3, so I'm closing this issue even though there's an easy draw perf improvement in draw itself by reducing the |
mapbox-gl-js version: 2.0.1
mapbox-gl-draw version: 1.2.0
While there are numerous outstanding bugs regarding general Draw performance, this one seems unique in that repositioning vertices doesn't even start on an iPhone 6s until the touch point is lifted.
Steps to Trigger Behavior
Here is the symbol definition:
Expected Behavior
Vertex dragging should be fluid even with symbols. Lacking this, having a hook so that I can manually disable the symbol while dragging would be an acceptable alternative.
Actual Behavior
It appears that drawing of the intermediate drag positions doesn't happen until the touch operation completes.
WIN_20210121_12_43_52_Pro.mp4
The text was updated successfully, but these errors were encountered: