There are quite a few factors involved with writing out a movie with the data coming from OpenGL.
Usually the biggest cost is downloading the image from the GPU to the CPU. Although you may hear big numbers about the bandwidth of PCI express, this is only true for the upload speed to the GPU. The download speed from the GPU is far slower, like 10% of the upload speed.
We use OpenGL features to try to make this have a small impact, in particular we write images 1 frame late, so that we aren’t stalling waiting for the download (i.e on frame 10, the movie out top is writing frame 9).
Then there is the compression. This is done in another thread to help avoid the cost also.
Finally there is the writing to the file, which is done in the main thread.
Ways to speed it up is totally dependent on which of these issues are the cause of your slowdown. If you see Touch slowing down in areas other that the Movie Out TOP’s cook time when you start recording, it means the graphics driver is spending a lot of time downloading the image, and isn’t able to service other rendering commands as quickly. In this case likely reducing the res is your only option to speed it up, or maybe newer hardware. Updating graphics drivers can often improve the performance of this also.
If the Movie Out TOP cook time is large, check the performance monitor (turn on Graphics Driver Time in the ‘Monitor’ menu). Where does it say its taking a lot of time?
If your CPU usage is at 100%, then you need more CPUs or you need to reduce the workload that Touch is doing.
If it’s none of those, then maybe it’s disk access, as Achim suggested.
In the end, we do plan on trying different ways to make this faster. CUDA offers some new ways to download data from the GPU, which can potentially give us speedups. Also as Touch’s code continues to improve I expect this to get faster still.
To answer Achims question. The Shared Mem In TOP immediately uploads its received data to the GPU, so no your suggestion likely wouldn’t be particularly fast as its still ends up being an Upload then a Download from the GPU.