Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6708580
Votes 0
Synopsis Java applications slow when EXA enabled
Category java:classes_2d
Reported Against
Release Fixed 7(b43), 6u12(b03) (Bug ID:2170290)
State 10-Fix Delivered, bug
Priority: 4-Low
Related Bugs
Submit Date 29-MAY-2008
Description
FULL PRODUCT VERSION :
java version "1.6.0_10-beta"
Java(TM) SE Runtime Environment (build 1.6.0_10-beta-b24)
Java HotSpot(TM) Server VM (build 11.0-b12, mixed mode)


ADDITIONAL OS VERSION INFORMATION :
Linux mach1.mach 2.6.25 #3 SMP Sun Mar 25 22:45:33 CEST 2007 i686 i686 i386 GNU/Linux


EXTRA RELEVANT SYSTEM CONFIGURATION :
Fedora-8,  customer -2.1.1 driver, EXA accaleration enabled,  customer -945GM

A DESCRIPTION OF THE PROBLEM :
When I enable EXA accaleration on my Laptop which is equipped with an  customer  945 class GPU performance of java application is terrible.

Especially text seems to suffer a lot (Java2D->Mix->BezierScroller "fullwindow" with text only down to 7fps from several hundreds fps). When antialiasing of fonts is disabled the demo gets 100fps, which is not  customer  but better.
Swing applications are hurt a lot, resizing and scrolling is painful.

Also applets are slower.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Install Linux with  customer -driver and enable EXA

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
no slowdown
ACTUAL -
very large slowdown

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
java -jar demo/jfc/Java2Demo/Java2Demo.jar
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Run with:
    -Dsun.java2d.pmoffscreen=false 
however it makes X over network horrible slow, and its still slower (sometimes half the speed) of with XAA.
Posted Date : 2008-05-29 17:50:59.0
Work Around
N/A
Evaluation
Looks like this driver places the Pixmaps into video memory
which makes readbacks very slow.

I'd suggest trying to set J2D_PIXMAPS=shared env. variable 
before starting the application and see if it helps. 
This will place all pixmaps into shared memory and prevent
them from being pushed to vram. It will not affect the
remote X case.

Also, I'm assuming this is not a regression in 6u10 and 
can be reproduced in earlier releases. Please confirm.
Posted Date : 2008-05-29 18:37:24.0

Apparently newer X server/distros have EXA acceleration enabled by default, and
that disables shared memory pixmaps and places Pixmaps in vram permanently,
which kills our performance if we have to read from them (like in case
with antialiased text).

xrender to the rescue!
Posted Date : 2008-11-25 22:28:51.0

A fix was proposed to disable the use of pixmaps for the local X server case,
when shared memory pixmaps aren't available.
Posted Date : 2008-12-01 18:28:10.0
Comments
  
  Include a link with my name & email   

Submitted On 23-JUN-2008
linuxhippy
Just stumbled over this.

On EXA the situation for Java2D is not that good. There is no support for SHM shared pixmaps, and pixmap/window-readback from the X-Server is now way slower (because pixmaps are now stored in VRAM).

I am currently working on an XRender based pipeline which should help in most situations where you experience slowness.


Submitted On 06-JAN-2009
linuxhippy
this is also related to: https://bugs.launchpad.net/ubuntu/+source/sun-java6/+bug/288650



PLEASE NOTE: JDK6 is formerly known as Project Mustang