What are the Jitter bottlenecks?
Dec 13 2009 | 11:24 am
I am currently working on a jitter project that requires optimization and am wondering if any hints can be had.
The project: 3 years ago I built a videosampler that can stream up to nine videos on to a single screen, the videos being triggered by a midi keyboard. (So the order is not known). The performer on the instrument uses it as a musical instrument and is a percussionist so this has to be done with extremely low latency, anything above 20ms is unacceptable.
This was acchieved by driving the frames of jit.qt.movie from the sync output of sflist/sfplay objects and displaying them on the screen using jit.gl.videoplanes. This works suprisingly well reading the movies on the fly with asyncread, where the sound starts playing immediately and the image comes a little later when the file is read. I then have a poly with nine instances, one for each movie potentially being displayed, reading the films on the fly, and three different resolutions depending on how big the displayed movie will be.
The challenge: However the performance of the patch is completely different on different systems and as it stands today it really only works well on a single 4 year old dual core xp pc (a fast machine but not nearly as fast as the new top of the range quad core laptop I am porting it to), there is an unacceptable drop in performance when going to newer more powerfull machines. I am wondering where I should look for the bottlenecks. I have made a new version working on the poly movie bank principle (running 150 instances..) using mutlithreading but still have not been able to match the performance of the old system. Have also used loadram but that does not seem to make any difference in the poly moviebank scenario.
Question 1: Why does the jitter framerate drop long before the cpu maxes out or even passes 50%
Question 2: What could be the other bottlenecks causing less than stellar performance.
Question 3: Any other tips?
Thank you very much for any tips!