AWT
Nathan Meyers
nmeyers@teleport.com
Wed Aug 4 22:05:00 GMT 1999
Jeff Sturm wrote:
>
> On 4 Aug 1999, Thomas Reilly wrote:
> > Swing on the JDK probably draws the entire GUI in the client and
> > probably sends the whole thing to the server through the X protocol
> > socket.
>
> Swing does make extensive use of double buffering, which should use a
> pixmap resource, at least on X. But you are right, that Swing is very
> heavy on the client.
>
> I have heard from others that it gets worse with JDK 1.2 and the Java2D
> api... specifically that font rasterizing is now done in the client too.
You've heard correctly... Java2D performance is poor on Linux, although
perhaps a bit more tuned on Solaris and NT. I wrote a Swing-based
benchmark that times redraws of a window full of text. Times on Linux
for a typical test:
JDK1.1 w/ doublebuffer: 48 ms/repaint
JDK1.1 w/o doublebuffer: 27 ms/repaint
JDK1.2 w/ doublebuffer: 110 ms/repaint
JDK1.2 w/o doublebuffer: 3100 ms/repaint (not a typo!)
The Java2D is very much tuned to rendering on a client-side buffer (at
least I strongly suspect it's client-side): when you turn off
double-buffering, it uses the X protocol so inefficiently that it
manages a nearly 30x slowdown. Profiling suggests that font
rasterization is *not* the primary culprit.
Nathan
More information about the Java
mailing list