jogl apps on Fedoa Core 5 run very slow

I recently upgraded from Fedora Core 4 to Fedora Core 5, and now my jogl application, using a GLJPanel, sucks up CPU (100%) most of the time. The display method seems to execute reasonably fast (I time it in the tens of milli seconds), but the redraw on screen of the GLJPanel is slow (~10s). You literally see it redrawing from the bottom up.

I’m using the latest nightly builds of jogl, mustang b80 and a NVIDIA 8756 driver. I’ve seen a few posts that it might be Swing and the GTK theme but does anyone have this problem or a way for me to identify what it is exactly.

I haven’t seen this behavior. Is it possible for you to write a non-OpenGL test case emulating the behavior of the GLJPanel by just alternating drawing two stored BufferedImages to the screen? Keep in mind the pixels of the BufferedImage will have to be copied in each frame to avoid VRAM caching by the Java2D implementation.

Have you tried running with JDK 1.4.2 and using the -Xprof option to see where most of the time seems to be going? Unfortunately -Xprof significantly slows down the application in Java SE 5.0 and later.

Have you tried with Mustang and -Dsun.java2d.opengl=true? That’s the case on which we’re focusing our optimization effort and it should be basically as fast as using a GLCanvas.

I only use mustang and the -Dsun.java2d.opengl=true because I want access to the OpenGL pipeline in my application. I will try the -Xprof but I’ve never used it before, so I hope its not too diffcult to interpret the output.

Could you please indicate exactly the configuration under which the GLJPanel is so slow? Is it with Mustang and -Dsun.java2d.opengl=true, or another JDK version with / without -Dsun.java2d.opengl=true?

Basically, if it’s slow with -Dsun.java2d.opengl=true on Mustang, try removing that argument and seeing whether it improves the behavior. If it’s slow with a previous JDK with -Dsun.java2d.opengl=true, try removing that command line argument, as there is interference between JOGL and the Java2D OpenGL pipeline in pre-Mustang releases. If it’s slow with either a previous JDK or Mustang without -Dsun.java2d.opengl=true, try with Mustang with that command line argument.

It seems to be FC5 and Swing because I tried the SwingSet2 demos and the JColorChooser demo causes the CPU to run at 100%. Its probably not jogl related. I tried 1.5.04 and the CPU usage is the same. On a FC4 machine the CPU usage is 90% but that machine is using the MESA libraries.

My usage is with -Dsun.java2d.opengl=true and GLJPanel running under mustang b80.

Thanks for following up. I would strongly recommend you raise this on either the Swing and AWT forum or the Java2D forum on javadesktop.org. The JDK developers frequent those forums most and this sounds like a potentially serious performance issue that we should at least diagnose.

Are you sure you get any hw acceleration? I read somewhere the NVIDIA driver won’t work correctly with the FC5 kernel, and for it to work you need to update your kernel. Haven’t had a chance yet to install FC5 here.

Cheers,
Matt.

Yes, I have hw acceleration working. I get ~4000 fps on glxgears on a Inspiron 5150.