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

Raster optimization: how deep to lookup for parent for fade #9062

Closed
wants to merge 1 commit into from

Conversation

astojilj
Copy link
Contributor

@astojilj astojilj commented Dec 4, 2019

Avoid sequential lookup from current zoom all the way to zoom level 0 as it affects performance.

Do the same approach as used in SourceCache.update when calculating retained raster tiles const minCoveringZoom = Math.max(idealZ - SourceCache.maxOverzooming, sourceCache.getSource().minzoom);.

If layer.paint.get('raster-fade-duration') is 0, no need to calculate parent since it is anyway ignored in getFadeValues.

The optimization is done based on measurements in #8979 (comment)

Before the patch:

Screen Shot 2019-12-04 at 11 59 28

After the patch:

Screen Shot 2019-12-04 at 11 57 47

Raster optimization: how deep to lookup for parent for fade

Avoid sequential lookup from current zoom all the way to zoom level 0 as it affects performance.

Do the same approach as used in SourceCache.update when calculating retained raster tiles `const minCoveringZoom = Math.max(idealZ - SourceCache.maxOverzooming, sourceCache.getSource().minzoom);`.

If layer.paint.get('raster-fade-duration') is 0, no need to calculate parent since it is anyway ignored in getFadeValues.
@astojilj astojilj self-assigned this Dec 4, 2019
@astojilj
Copy link
Contributor Author

astojilj commented Dec 4, 2019

Closing this temporarily while re-verifying the impact.

@astojilj astojilj closed this Dec 4, 2019
@astojilj astojilj deleted the astojilj-rasterParentLookup branch March 23, 2020 09:58
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

Successfully merging this pull request may close these issues.

1 participant