Preloading massive image still dropping frames

Hello everyone,

I’ve got a massive image (roughly 12,000x12,000) that I need to load on the fly. I have time to preload it over multiple frames but I’m still dropping frames while that happens. All of my TOPS have their display off and the movie file in TOP is then fed into a GLSL TOP which eventually is displayed to the container. To perform the preload I run the following Python code: = False
img_op.par.file = "new file path"

Connected to the Movie File In is a chop execute that runs once fully pre read to set the flag to True

The images I’m loading are .dds files and my tuning parameters look like this

I’m doing the exact same process on 4K images and I’m not dropping frames. Is there something I can do to improve the performance of the image reading?

Thank you very much!

Here is my Disk usage. It might be that my disk read is the bottleneck so I’m curious if there is a way to essentially increase how long it takes to load an image but in return not drop frames.


Your Frame Read Timeout parameter is set to 100000 msec, this is the time TD will wait for a frame to load before rendering the next frame. So this results in TD waiting/freezing until image load is complete.
Try changing that value to something like 10msec.

Hi @nettoyeur, thanks for the suggestion. Unfortunately that doesn’t seem to make a difference. I’m loading a single still image at a time so I don’t think the frame read is affecting it.

Memoryallocation can also take up quite some time (as in all the TOPs that follow your movieFileIn will have to allocated new memory when their resolution changes.)
So maybe try using constantTOP with the same resolution as the movieFileInTOP and switch from the constant to movieFileIn when the image is completly loaded.
Also also, you can activate “Always load initital frame” to at actually load/preread the image even before a cook is requested.

Thanks for the suggestion @alphamoonbase. I tried this but didn’t seem to manage to stop the dropped frames. I get the frame drops regardless of what I do with the move file in. Even if it is not connected to anything and is not being displayed.

Anyway, I really appreciate the help from everyone. In the end I put all of my images I need to load into a hap video and I can just barely fit it in memory so I’m going to move forward with caching it all at the beginning. I’m going to mark this as the solution with the suggestion for anyone else having this problem to see if the compression of putting the images into a hap file is enough to get you by (amazingly there seems to be no difference in quality and I’ve gone from about 600 MBs per image to 2.5 GBs for a 10 frame video).

Frame read timeout will be ignored when using preload(). It tries to make the preloading work no matter what your parameters are.
Would you be able to send a link to the file you are having issues with? I can see if there is a reason for it to be causing an issue. It may just be the GPU needing to pause to allocate such a large amount of memory though.

1 Like

After looking into this some more, I think your solution to use a movie is best. The main problem is that there is a lot of memory that is cleaned up after a single frame image is loaded, which needs to be reallocated again when loading again. With movies that memory sticks around, and can also be reused for another preload().
So scrubbing through a movie will always be better since more memory will be kept around and ready to be re-used.

1 Like