Hi Ko Ko,
Good to hear your views. You are saying that you've seen less than crisp performance
on Swing desktop apps in the past, and you are wondering if there are any improvements
to Swing performance in Tiger.
Well, the answer is a resounding YES, you will no doubt be pleased to hear. Swing performance
is markedly improved in
Java 5, just as we have seen improvements in all the earlier
releases, (just as Ernest gives the details).
In fact, the desktop client is one of the six big themes defining the Java 5 release! The whole
list is:
1. quality is job #1
2. performance and scalability
3. monitoring and manageability
4. desktop client
5. ease of development
6. core XML support
I already mentioned the class data sharing
boost. The development team also put a lot
of effort into memory footprint reduction of the runtime library. And the run time library
will be shared among all JVMs, rather than loaded individually for each new program. So
that speeds up start time when you have several Java programs running.
There has also been more work done on the Hotspot compiler.
The lead architect for Java 5, Graham Hamilton blogged his thoughts:
"We've worked to improve both the performance of the Java desktop client, but also the GUI
look-and-feels. We've continued to improve the quality of the Windows XP look-and-feel
and the GNOME GTK look-and-feel." So I think that is evidence of effort being put into
Swing at the highest levels.
There weren't too many Swing changes in the Java 5 release. Were you thinking of something
specific? One thing that made me laugh out loud was that you can now add components
directly to a container, rather than getting the content pane first and adding to that! It
should have been done like that from the start, but a correction after 8 years is better than
no correction.
There is a new cross-platform theme, "Ocean". But most of the Swing changes are in
performance, not API semantics, so the examples in
Just Java do not change for
Java 5 in terms of screen dumps.
Hope this helps. I am really looking forward to seeing some Swing benchmarks. And
I encourage everyone to download the FCS (First Customer Ship) version of Java 5
which is up on the Sun website even as I write!
http://java.sun.com Cheers,
Peter