Hi all!
We're running into an issue where we are seeing a great decrease in performance
when opening 1000s (23,317, specifically) of files with image buffers in
Python.
Initially, each image is very fast (many per second), but as time goes it, the
perf drops to < 1 image/sec.
Our problem is that we were looking at dds files to pull out the compression
(using the "compression" attribute on the image spec). Suspecting it was maybe
an issue with dds io, we just switched to more generic images, with a more
generic attribute query:
import OpenImageIO as oiio
def get_resolution_from_attr(file):
"""Getting the resolution from an attribute. Yes there are better ways
to get resolution :)"""
buf = oiio.ImageBuf(file)
spec = buf.spec()
xres = spec.get_attribute('XResolution')
yres = spec.get_attribute('YResolution')
buf.clear() # Didn't seem to make much of a difference
return file, xres, yres
Before we get all deep with the debugger - is there anything obvious that we're
doing here that might cause the gradual slowdown of the image buffers? Not
using image buffers isn't much of an option for us as we need to do some
image-buffery stuff with them later.
Thanks!
-J
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org