look for loaded parent tiles in cache #2158
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When the required tiles aren't loaded yet it tries to find parent tiles that area loaded that a cover the area. It used to just look for parents in the set of previously rendered tiles. There are many cases where the parents aren't in that set but they are in the cache.
This reduces the amount of the viewport not covered by tiles. It makes tile loading look a lot faster.
It helps a lot when you:
fixes #1918
This only loads parents, not children. I tried also loading children but it looked weird sometimes. Try the
load-children-from-cache branch to see what it's like.
If children are loaded from the cache you sometimes see flashes of high resolution tiles while zooming in. Seeing the area change from too-low-resolution to too-high-resolution to just-right-resolution is more jarring than just too-low-resolution to just-right-resolution.
👀 @mourner