Frame rate slow for multiple canvases

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Frame rate slow for multiple canvases

normw
I have 5 simple canvases being displayed in a single frame.  The cpu's are loaded at 1/2 a percent.  My frame rate is about 12 FPS.  I've tried all sorts of strategies( an animator, calling canvas.repaint() in a timed thread, ...).  I'm guessing that each call to a canvas display() method, regardless of how it's done, will delay further processing until the next swapbuffer. Any ideas?
Reply | Threaded
Open this post in threaded view
|

Re: Frame rate slow for multiple canvases

gouessej
Administrator
Hi

You don't give us enough information. Do you reproduce your problem of performance on a unit test? Do you use AWT or NEWT? I display 6 canvases in the same frames without troubles in my case but there is nothing that we can do if your geometry is quite big. I don't know what the bottleneck is.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Frame rate slow for multiple canvases

normw
In reply to this post by normw
Thanks for the reply.  I'm triggering off the sound card upon reading a 2K sample.  Since posting I put a nano timer around my TargetDataLine.read().  I'm consistently getting data in less than 2 msec. with 135 msec. spikes every third to fifth sample.  I think this is my problem - not a JOGL issue.
Reply | Threaded
Open this post in threaded view
|

Re: Frame rate slow for multiple canvases

gouessej
Administrator
Ok thank you for the feedback. Maybe you can use JOAL instead of JavaSound but I can't be sure that you would get better performance. You can split the reading of the data and the update of the display so that the former doesn't drive the later "slow".
Julien Gouesse | Personal blog | Website