-
-
Notifications
You must be signed in to change notification settings - Fork 717
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
Cancel unloaded tile request on zooming in across multiple zoom #2377
Conversation
Is it possible that this is by design? So that if a higher zoom level fails we will still get the next zoom level that succeeded? |
I think its a bug and not by design for 3 reason
|
Please let me know, if any other information is needed for this PR. |
This is a breaking change, isn't it? |
Updated Changelog with [Breaking] tag. |
FYI, I think the previous behavior was by design. Showing intermediate LOD tiles will make the progressive loading of map features feel perceptibly "faster" even if loading only the final LOD takes less time end-to-end. there are less jarring transitions between map appearance states with the old behavior. If your interaction is with an API e.g. Mapbox where the vast majority of tile requests are edge cached and fast (~60ms) then I think the previous behavior might have a better end user experience. The new behavior is definitely better for bring-your-own-tile situations where requests can take more time. I prefer the new behavior over the old one, but am sympathetic to certain use cases wanting an opt-in flag back to the old behavior (could demand a style spec change) |
While I didn't work directly on this behavior in Mapbox GL, this description matches my understanding of what we were going for with continuing to load lower-zoom tiles. You could think of it as something like -- if network latency means you're two zoom levels behind during a 5-second zoom operation from z3 to z15, you can show a pretty intelligible map the whole time. If you're aborting intermediate tiles, the z3 tile becomes useless pretty early on and for most of the 5 seconds you're not showing anything intelligible, until the z15 tile arrives. If your network connection is kind of on the edge of being able to load tiles fast enough while you zoom, you get a kind of hard-to-predict behavior where sometimes you get a sprinkling of tiles at intermediate zooms, but you don't know which ones will or won't show up. That said, if you're loading really data-heavy tiles (or have a slow network connection), the effect is not great -- you still don't see anything during your 5-second zoom operation, but then once you arrive at z15, you sit around waiting for the map to update with the in-flight lower zoom tiles before you get the z15 tiles you actually want. |
Maybe there's a compromise method such as canceling every even-numbered zoom level loading in progress, to get some of the progressive appearance while still feeling faster on slow connections. |
There are 4 classes of issues and not just network speed that need to be considered.
|
Maybe the middle ground here is to have this configurable? So one can decide between bandwidth and responsiveness? |
This was discussed today in the TSC meeting. |
Hi @HarelM @pramilk , could this be causing perceived performance issues? paris-zoom-blurry.mov |
@DanielForniessoria-TomTom feel free to open an issue to describe the problem and/or PR to solve this. |
@HarelM I reverted the change locally and tested again, see video with the result. paris-zoom-in-no-tile-cancel.mov |
This change was introduced in a breaking change version, we can't ignore this concept when it doesn't serve us, otherwise, what's the point of following semver. |
Launch Checklist
Currently on zooming in across multiple zoom level, tile request which were previously invoked does not get cancelled.
So, if user does a fast (or has a slow network) zoom in from LOD 5 to 8. Then network panel shows that the request for 5,6,7 zoom tiles in the viewport does not get cancelled (Tiles outside the view do get cancelled).
This change will keep the tiles which have completed loading while zoom-in, but will cancel can unloaded tiles.
Zoom out did not had this bug. Have added a test for both zoom-in and zoom out scenarios.
CHANGELOG.md
under the## main
section.