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

test: Optimize running of oiiotool-demosaic test #4429

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

lgritz
Copy link
Collaborator

@lgritz lgritz commented Sep 17, 2024

This test was running very slowly, taking too long in all circumstances, but shockly causing GHA CI Mac runners to hit the test timeout sometimes.

It turns out we were doing a lot of redundant work. There was no need to make separate pattern and bayer images for every data type. Instead, hoist the test image generation out of the loop and just make one (float), then use -i:type=<type> to read it into an ImageBuf of the appropriate data type.

This cuts the time for this test to run by about 3x.

This test was running very slowly, taking too long in all circumstances,
but shockly causing GHA CI Mac runners to hit the test timeout sometimes.

It turns out we were doing a lot of redundant work. There was no need
to make separate pattern and bayer images for every data
type. Instead, hoist the test image generation out of the loop and
just make one (float), then use `-i:type=<type>` to read it into an
ImageBuf of the appropriate data type.

This cuts the time for this test to run by about 3x.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
@lgritz lgritz merged commit 9c7f522 into AcademySoftwareFoundation:master Sep 17, 2024
27 checks passed
zachlewis pushed a commit to zachlewis/OpenImageIO that referenced this pull request Sep 17, 2024
…dation#4429)

This test was running very slowly, taking too long in all circumstances,
but shockly causing GHA CI Mac runners to hit the test timeout
sometimes.

It turns out we were doing a lot of redundant work. There was no need to
make separate pattern and bayer images for every data type. Instead,
hoist the test image generation out of the loop and just make one
(float), then use `-i:type=<type>` to read it into an ImageBuf of the
appropriate data type.

This cuts the time for this test to run by about 3x.

Signed-off-by: Larry Gritz <lg@larrygritz.com>
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