Posted by javajason83
on December 11, 2008 at 10:11 AM PST
When running a Java application and routing the output to another display using X Windows, I see a trade-off between performance (frame rate) and horizontal image tearing. To remove the complexities of my application from the issue, I'll use the Java 2D Demo as my example.
When I set the DISPLAY environment variable to another machine on my gigabit network and launch the Java2D Demo, the performance is fairly slow. Going to the Transforms tab and enlarging the lower panel - demos.Transforms.TransformAnim - for example, shows a fairly slow animation. Running again with off-screen pixmaps disabled (-Dsun.java2d.pmoffscreen=false) results in a significant performance boost, with the unpleasant side effect of horizontal tearing.
I realize I may be asking to have my cake and eat it too, but is there any way to get the best of both worlds here? Or, if not the same performance without tearing, is there any middle ground? Any fancy alternatives I could try to reduce tearing without the performance hit seen when pixmaps are enabled. My app makes heavy use of moving images and the tearing seen without pixmaps renders it almost unusable, while the performance hit when using pixmaps makes a remote solution definitely unusable.