I'm working on a realtime imaging system.
UI thread: grabs images from a camera at 14 fps via timer and does some processing/display. Every 2 seconds, 3 images (about 1mb on disk each) are selected by processing to be written to disk. These are put in a shared queue.
Second thread: dequeues images and writes to disk. Has been given 'Lowest' priority.
When the second thread is performing the writes, it takes a noticeable chunk of perf away from the UI thread and causes capture to drop below 14 fps. Not acceptable.
What can I do here? I don't mind if the writes take a longer time and queue up, there's plenty of RAM and a regular pause to allow the writes to catch up. The critical factor is for the UI thread to have enough juice to work at 14 fps.