What are the Jitter bottlenecks?


    Dec 13 2009 | 11:24 am
    Hello list.
    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!

    • Dec 14 2009 | 10:28 am
      i would also consider trying a different graphics card, especially as you are using openGL to accelerate performance.
      perhaps also check the sfplay > jit.qt.movie part of the patch, as this might need some trickery to slow down the number of frame messages... i assume this is how u have done it.
      hth,
      j
    • Dec 24 2009 | 9:47 pm
      Hi! i'm also interested in any tips towards Jitter optimization. My current project also contains multiple jit.qt.movie, although not in a poly (yet) mapped on videoplanes with some other openGL elements such as 3D text and basic shapes with jpg textures. I'm running latest Max on Vista Premium SP2, CPU Intel Core2 Quad 2.4Ghz with an Nvidia 8600. When running my patch, CPU goes up to 70% (spread evenly among the cores) and the framerate is at approx 12 FPS. When running Process Explorer (procexp.exe) I can see that the threads that get most CPU are nvoglv32.dll, MaxRT.exe and MAXCRT.dll. but knowing that doesn't change much...
      Any tips are welcome.
      Happy Holidays to all!
      Hugobox.
    • Dec 25 2009 | 10:42 pm
      Sounds like your hard drive would be the first issue. This would also explain the performance drop for the lappy.
      But I don't understand if you are playing more than 1 vid at a time.
      If you have alot of ram try loadram. If that makes a difference get a load of ram or the fastest drive you can afford!
      If you are using a pc I fear you'll never get good results using a QuickTime based playback system.