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

perf(core): load tile sizes from tag if it is already loaded #1317

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

blacha
Copy link
Owner

@blacha blacha commented Oct 17, 2024

Motivation

to read a tile you need both the tile offset and size of the tile, a optimization that COGs do is to store the tile size just before the offset, so that if you read a chunk of data near the offset you generally get both the tile size and the content of the tile

in some conditions this can result in multiple reads of the remote datasource, one to get the tile offset then one to get the tile content.

The tile size is also stored in the TileByteCounts tiff tag and if that is already loaded it should be the preffered method of fetching the tile size.

Modification

If the tile byte size tiff tag is loaded read the tile size from that tag instead.

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