Tom94 / tev

High dynamic range (HDR) image viewer for graphics people
BSD 3-Clause "New" or "Revised" License
1.03k stars 87 forks source link

IPC updateImage performance issue #120

Closed KarelPeeters closed 2 years ago

KarelPeeters commented 3 years ago

I was running a render that was pretty fast, about one minute for 1920x1080, data sent to tev in 16x16 blocks of pixels which looks like this:

image

I imagine that this is a typical intented usecase of the IPC. I noticed that tev was using about 25% of the CPU, and some profiling revealed that a lot of the time was spent in setting up and taking down the threadpool here: https://github.com/Tom94/tev/blob/d7aaf6c0f02dfefa0ad7c565bb7da2d33b6a0876/src/Ipc.cpp#L251

Could this threadpool be made persistent? Right now it's created and destroyed for each updateImage packet received which is not very efficient.