Poor graphic performance on java apps
linuxhippy at gmail.com
Mon Oct 10 22:58:19 PDT 2005
> > I'm a java developer using the IntelliJ idea IDE. I had a dream once
> > that I could switch to Linux, but it seems that the X is the
> > bottleneck. The IDE (and also the Swing clients I'm developing) has
> > really bad resposiveness compared to what I'm used to on Windows.
> > Anyway I could tune the X system to speed it up, or is it hopeless?
> > Any alternatives to X on Linux that supports Java Swing?
First of all I also use a swing IDE on my linux box (netbeans) and it
works quite well - it even works many times better than the
slow-as-ever Eclipse. Sure there many improvements in 1.5, it now
feels much better than before.
Java is a bit slower sometimes when running under Linux which has 2 reasons:
* X causes more overhead compared to a kernel-based rendering
structure, however X's design is much better
* Java is not as optimized on X as its on Windows, especially in areas
of desktop applications (Java2d).
However there are still some things you can do:
* Install X-drivers that support 2d hardware accerlation
* If you have a NVIDIA card, start IDEA with the command
-Dsun.java2d.opengl=True and if the output is "Enabled Opengl-pipeline
for display ?:0" then you are not using X for renderinga nymore.
However this only works well with the latest Mustang-EA builds.
* Run idea with the switch -Dsun.java2d.trace=count and post the
output here, if there are many calls with "sun.java2d.loops" in it I
would report it to IDEA since this means you use a lot of software
> Before you decide it's X on Linux fault, have you checked eclipse
> responsiveness in Fedora Core 4 ? (I say eclipse since that's the java
> IDE included in Fedora Core, nut it's not using swing).
Well, its MUCH slower on my 2 computers than swing based applications,
I profiled it and most time seems to get lost somewhere in pango.
I asked wether I could help at the GTK mailing list and they repsonded
that its normal thatpango is that slow since its so feature rich. I
use QT anyway since I hate to have 100 pseudo-independent libraries
spead over my system ;-)
More information about the xorg