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

Avoid append only cache in WebGL tile layers #13997

Merged
merged 1 commit into from Aug 17, 2022
Merged

Avoid append only cache in WebGL tile layers #13997

merged 1 commit into from Aug 17, 2022

Conversation

tschaub
Copy link
Member

@tschaub tschaub commented Aug 16, 2022

The WebGL tile renderer maintains its own cache of tile textures. When a layer is configured with an explicit cacheSize, this is passed to the renderer's cache. And the intention is that the source's cache remains near empty. In #12671, the cache size for the data tile source was set to 0.1 to make sure it stays empty. But for all other tile sources, the source's tile cache has a size of 0 or unlimited.

The Canvas tile renderer calls source.updateCacheSize() to manage the cache on its layers' sources. This change makes the WebGL tile renderer do the same. (Having the renderer reach through the layer and the source to manage the tile cache is further support for moving the cache to the renderer instead of the source.)

Fixes #13927.

@github-actions
Copy link

📦 Preview the website for this branch here: https://deploy-preview-13997--ol-site.netlify.app/.

Copy link
Member

@ahocevar ahocevar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ahocevar
Copy link
Member

(Having the renderer reach through the layer and the source to manage the tile cache is further support for moving the cache to the renderer instead of the source.)

If we do that, we might consider doing it in a way that the same source can still be used in more than one layer, without having to have its own cache for each layer renderer.

@tschaub tschaub merged commit edd28d7 into openlayers:main Aug 17, 2022
@tschaub tschaub deleted the stop-caching branch August 17, 2022 10:25
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.

Tiles/canvas not released by WebGL renderer?
2 participants