Off topic

June 19th, 2008

Just around a week ago we welcomed our second kid (and first son) into the family. Now we have one of each kind, and it’s undoubtedly going to be an interesting journey. As they say, having two kids is much more than twice the work, and most probably it is going to affect my open-source efforts in at least the short term. I’m doing this on my own free time, and the priorities in this matter are quite clear. But as you can see from the last three postings, the business is almost as usual, so don’t be too quick to run to the competition :)

Those of you who’re using the various libraries that i develop know that i mostly prefer the very liberal BSD license. This makes them very friendly to both open-source and commercial projects, and i’m quite thankful for all the feedback and bug reports that i get from the projects’ users.

I have added a new button to the project site. Clicking on this button will take you to our Amazon wish-list. If you want to express your thanks for one or more of these projects, support the ongoing efforts being put into them, and make sure that my wife views all the late hours in front of the laptop in a positive light, you’re more than welcome to click through.

As a follow up to the previous post that showed how LightBeam tool can be used to analyze the performance of various core and third-party Swing look-and-feels, today i’m going to answer Luke’s question in the comments section and compare the performance of the core Substance skins.

The table below lists all available core Substance skins, and three numbers for each skin. The first number is the average time to complete a static performance scenario (rendering a bunch of controls to an offscreen image). The second number is the heap size after the static performance scenarios have been completed. The third number is the total time to run all dynamic performance scenarios (the list can be found in the PDF report or in the source code).

There is a simple explanation why Magma, Office 2007 family and Raven family have 25-45% worse dynamic performance than the rest – they use watermarks. I have already mentioned that this has been identified as the biggest performance obstacle during the performance tuning of version 5.0dev, and the skins that used the simple translucent-fill watermark do not use any watermark at all. The selected skins mentioned above are still using non-null watermarks to provide better visuals. You can extend these skins and set the watermark field to null in the constructor to get better performance (but less distinct visuals).

As you can see, there are minimal differences in the rest of the skins, even though they use different button shapers and painters. The core button shapers and painters have been improved to provide uniform performance so that you don’t have to sacrifice the visuals for the performance (except, once again, the watermarks).

If you do find that your custom skin has distinctly different results under different painters, i would be very interested in hearing about this in the project forums, mailing lists or a private e-mail.

About a month ago i have introduced the new project named LightBeam that aims to assist look-and-feel writers to measure performance of their libraries under various static and dynamic scenarios. I have used this tool extensively during the performance optimizations of the next release of Substance look-and-feel, and it has now reached its first official release 1.0 code-named Antares.

The project distribution contains sample script files to test static and dynamic scenarios under the core look-and-feels (Metal, Windows and Nimbus), as well as a selection of active third-party look-and-feels (Substance, Looks and Synthetica). The performance spreadsheet available for download contains the breakdown of different scenarios, and here is the “executive summary” for the dynamic scenarios that try to emulate most common user interaction flows:

  • 3,039 ms – Metal
  • 3,721 ms – Windows
  • 4,004 ms – Looks Plastic XP
  • 4,696 ms – Nimbus
  • 4,794 ms – Substance Autumn 5.0dev
  • 4,908 ms – Synthetica default
  • 13,146 ms – Substance Autumn 4.3

All the numbers are taken on my main development machine running the latest b26 of 6u10.

Here are some Swing links that you might have missed during this week:

  • Jan Erik Paulsen experiments with the new functionality of shaped and translucent windows in 6u10. The screenshots are impressive, and he is correctly pointing out two main deficiencies of the current (semi-private) API. The first is that you need to attach a listener to re-compute the window shape on window resize, and the second is lack of auto soft-clipping on the window shape outline.
  • Jan Haderka has announced release 0.9.3 of SwingX. The release notes are available as well, and my only wish is that the official 1.0 release will be before the project turns four years old (next March).
  • Dave Gilbert has announced release 1.0.10 of his JFreeChart library.
  • Gunnar Sletta writes about release 4.4.0 of Qt Jambi, a Java port of cross-platform Qt client application framework. In addition to supporting all the new Qt features, like Phonon, Webkit, Widgets in Graphics View, XQuery and Qt Concurrent, it also has an improved deployment system, JDBC support and a compile-time checked signal-slot approach.
  • Artem Ananiev solicits feedback on the forthcoming JWebPane component. This is a little bit problematic without any kind of downloadable content and no (even preliminary) Javadocs of the current API. Collin Fagan (aberrant) has a few interesting requests in the comments section.
  • Jebgeni Kabanov has a screencast on changing the source code of a running Swing application with JavaRebel. Looking at the screencast (is there supposed to be sound), it doesn’t look overly impressive. Most of the changed functionality is available only in a new instance of a form (not in the running ones), and there’s even a glimpse into an exception during the last few seconds of the clip (look in the background Eclipse).
  • Andrew Sazonov has a nice utility class for scheduling a delayed invocation of an action listener. This is useful for delaying updating the detail pane as the user scrolls through the master table, or preventing highly dynamic updates of status strings in a progress indicator.
  • Finally, there is a lot of interest generated in Greg Brown‘s entry on Pivot, a framework for building cross-platform applications to be deployed on both web and desktop. I concur with Greg that building a new framework on top of Swing and exposing the underlying Swing components is not the best approach, and Pivot builds on top of Java2D instead. There is an interesting comment on Ben Galbraith‘s entry on Pivot that highlights the current trend in RIA toolkits (AIR / Silverlight) – audio / video, animations and skinning.