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

TIFF extraction makes fewer, larger reads #408

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

drewnoakes
Copy link
Owner

Previously we would read values one-at-a-time through IFD tables of TIFF data. There's a fair amount of indirection here.

With this code, we load the entire IFD table into a span (ideally on the stack) and read through it from there. This was identified in traces as a nice perf win.

As part of this work, constants were added to indicate the sizes involved, and some variable names were made clearer.

Also, the size restriction placed on IFDs was improved, so that they aren't required to have space at the end for the optional follower IFD pointer, fixing some cases in the regression suite.

Previously we would read values one-at-a-time through IFD tables of TIFF data. There's a fair amount of indirection here.

With this code, we load the entire IFD table into a span (ideally on the stack) and read through it from there.

As part of this work, constants were added to indicate the sizes involved, and some variable names were made clearer.

Also, the size restriction placed on IFDs was improved, so that they aren't required to have space at the end for the optional follower IFD pointer, fixing some cases in the regression suite.
@drewnoakes drewnoakes merged commit 1e5c141 into main Feb 12, 2024
2 checks passed
@drewnoakes drewnoakes deleted the read-tiff-data-in-larger-chunks branch February 12, 2024 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant