AcademySoftwareFoundation / AcademySoftwareFoundation/OpenImageIO

[BUG] Performance regression loading EXR files

Open
#4,629 2 comments 0 reactions 0 assignees View on GitHub
internals performance
Dominant language
C++
Stars
2.4k
Forks
698
Avg merge
3d 4h
Merged PRs (30d)
47

Description

**Describe the bug**

We noticed a performance regressions between OIIO 2.5.16.0 and 3.0.0.3 when loading EXR files:

With vcpkg 6e1219d^ (OIIO 2.5.16.0):
t1: 0.00086496
t2: 0.0387352
sum: 0.0396002

With vcpkg 6e1219d (OIIO 3.0.0.3):
t1: 0.0155549
t2: 0.0329414
sum: 0.0484963

(averages of 100 runs, release build)

Not only is the sum higher than before, but the first number t1 (just obtaining the ImageInput/ImageSpec to read the metadata) is much higher than before.

**OpenImageIO version and dependencies**

vcpkg 6e1219d^
OIIO 2.5.16.0 | Linux/x86_64
Build compiler: gcc 12.2 | C++17/201703
HW features enabled at build: sse2
Dependencies: Boost 1.86.0, BZip2 1.0.8, fmt 11.0.2, JPEG 62, libjpeg-turbo 3.0.4, OpenEXR 3.3.1, OpenGL, PNG 1.6.44, Qt6 6.4.2, Robinmap, TIFF 4.7.0, ZLIB 1.3.1

vcpkg 6e1219d
OIIO 3.0.0.3 | Linux/x86_64
Build compiler: gcc 12.2 | C++17/201703
HW features enabled at build: sse2
No CUDA support (disabled / unavailable at build time)
Dependencies: fmt 11.0.2, Imath 3.1.12, JPEG 62, JXL NONE, libjpeg-turbo 3.0.4, OpenEXR 3.3.1, OpenGL, PNG 1.6.44, Python3 3.11.2, Qt6 6.4.2, Robinmap, TIFF 4.7.0, ZLIB 1.3.1

**To Reproduce**

The test is attached. The texture (to be passed as first argument) is at https://github.com/NVIDIA/MDL-SDK/blob/master/examples/mdl_sdk/dxr/content/hdri/hdrihaven_teufelsberg_inner_2k.exr

[CMakeLists.txt](https://github.com/user-attachments/files/18706723/CMakeLists.txt)

[test.cpp.txt](https://github.com/user-attachments/files/18706725/test.cpp.txt)

Contributor guide

Open the contributing guide

Research direction

Start with the attached test.cpp.txt and CMakeLists.txt, using the linked EXR texture as the input. Run the benchmark against OIIO 2.5.16.0 and 3.0.0.3, focusing on ImageInput/ImageSpec acquisition and total load time. Done means identifying the regression and restoring comparable performance without changing expected EXR metadata or loading behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.