Performance improvements in Substance 5, part 2

The biggest pain point of Substance users, as expressed in the comments on the announcement of release 4.3, is the performance. While this might have been less noticeable for smaller UIs, the users of Substance NetBeans module were especially vocal about the performance issue. As i have already said before, you made your statement very clear, and performance improvements were placed as the top priority for the next release (code named Substance 5).

Following the extensive correspondence with Java2D team (thanks, Dmitri), i have created a new java.net project named LightBeam. LightBeam has a collection of static and dynamic scenarios that are targetting different core Swing components and different interaction scenarios. The static scenarios create a number of components and then render the main frame onto an offscreen buffer. The dynamic scenarios run a number of typical interaction scenarios that involve changing the components or models.

Here is the spreadsheet with the performance improvements on static scenarios. The numbers are milliseconds it takes to render a frame with a number of matching components (buttons, sliders etc) to an offscreen buffer (the smaller, the better).

An average improvement from version 4.3 is by factor of 3.5. As you can see, slider rendering was especially slow in version 4.3. Another important number to notice is the heap memory consumption – it has not grown at all as compared with version 4.3.

And here is the spreadsheet with the performance improvements on static scenarios. The numbers are milliseconds it takes to run a specific scenario and repaint the contents (the smaller, the better).

An average performance improvement from version 4.3 is by factor of 2.5. As before, sliders were especially slow in version 4.3. Note that there is one scenario where the additional visuals provided by Substance prove to be still too costly – in dynamically selecting table rows. This would, obviously, have to be addressed before the final release.

Project LightBeam is targeted at look-and-feel developers that wish to test the performance of their libraries. The SVN repository contains a number of sample scripts that were used in creating the above spreadsheets. It will be extensively used throughout the development of Substance to make sure that there are no performance regressions from this moment forward.

The latest development drop of Substance 5 should be very stable. You’re more than welcome to try it out and report any exceptions, errors or visual inconsistencies on the project forums, mailing lists or in a direct mail. Also, if you’re using NetBeans 6.1, please consider trying out the latest drop of Substance module. It should be noticeably faster, but if you’re experiencing any slowdowns, just right-click on the title bar and select “Show cache stats”. In the new dialog, click “Copy to clipboard” and attach the results to a forum / mailing list posting.

Update – the numbers above are for software unaccelerated rendering. No work has been done yet to analyze and improve the performance on d3d-accelerated pipeline.


Related posts:

  1. Performance improvements in Substance 5 Looking at the comments on the announcement of release 4.3 of Substance look-and-feel, the three...
  2. Performance comparison of Substance skins As a follow up to the previous post that showed how LightBeam tool can be...
  3. LightBeam – measuring performance of Swing look-and-feels About a month ago i have introduced the new project named LightBeam that aims to...


13 Responses to “Performance improvements in Substance 5, part 2”

  • Dmitri Trembovetski Says:

    Congrats, Kirill, those are pretty impressive numbers!

    Dmitri

  • Aloys Oberthuer Says:

    Hi Kirill,

    you stated in your earlier post that you ‘Removed performance-adverse functionality of custom overlay and composites’ and got only one complaint. So here’s a second – I really love(d) that feature and am gonna miss it. As a matter of fact it was one of the reasons I got interested in Substance L&F.
    Nevertheless I do understand that good performance is paramount and so I congratulate you on the enhancements. Should you find a way to reintroduce the features without performance loss I would still love to see them back.

    Many regards, Aloys

  • Kirill Grouchnikov Says:

    Aloys,

    It is highly unlikely that the custom overlays and composites will make their way back into the library. They posed significant coding complexity *and* performance overhead. In addition, this functionality has been unintentionally broken and intentionally not fixed during the last two releases. I only had one user report on this. This does not mean that a less used feature is not important, it’s just that it has hurt the long term health of the project.

    Thanks
    Kirill

  • Pedro Duque Vieira Says:

    Thanks Kirill, great work. Looking forward to use substance 5.

    Are you testing substance performance using flamingo components too? namely JRibbon?

    Thanks :)

  • Sérgio Santos Says:

    That’s really a impressive improvement. Nice work ;)

  • Clemens Eisserer Says:

    Hope that Substance will also get some tuning for the X11 and OpenGL pipelines.
    Thats the only option Unix-Users have so far ^^

    lg Clemens

  • Kirill Grouchnikov Says:

    Clemens,

    All these numbers are for software rendering. So, Substance will also be 2.5-3.5 times faster on Unix / Linux.

    Thanks, Kirill

  • Bastien Says:

    Hello Kirill,

    I really really loved your substanced 3.x and 4.x versions and used them for my private tools. Now doing a commcercial java desktop app for an appr. release at end of october 08 i would like to know if you can say that at all… what v5.0 features will be done till then?

    in v4.3 i used these settings:

    UIManager.setLookAndFeel(new SubstanceBusinessBlueSteelLookAndFeel());
    SubstanceLookAndFeel.setCurrentTheme(new SubstanceLightAquaTheme());
    SubstanceLookAndFeel.setCurrentWatermark(new SubstanceMosaicWatermark());
    SubstanceLookAndFeel.setCurrentDecorationPainter(new Glass3DDecorationPainter());

    the last 3 settings could not be used with v5.0 but i would like to have till end of october :D

    btw. i really think you dont need to develop 30 skins… nobody is using a ugly looking Black skin or fire red not even for hobby puposes.

  • Bastien Says:

    update:

    quote:”…No work has been done yet to analyze and improve the performance on d3d-accelerated pipeline.”

    Hello Kirill, i havent read anywhere that your substance v5 will be supported by hardware 3d acceleration or do you plan it? I mean today every PC or notebook supports this so you should use it;-)

  • Kirill Grouchnikov Says:

    Bastien,

    Sun’s own benchmarks show only about 40% improvement when running Nimbus on D3D pipeline (unlike the “orders of magnitude” mentioned at JavaOne). I do plan on analyzing Substance for additional improvements on D3D pipeline, but i’m not sure what do you mean by “supported by hardware 3d acceleration”. It is running correctly on D3D pipeline providing correct visuals. And it is slightly faster than the software pipeline, but not close to 40%. So, yes, there is work to be done, but you most certainly can run Substance on modern hardware and not experience any visual artifacts.

    Thanks
    Kirill

  • Kirill Grouchnikov Says:

    Bastien,

    About your questions on the API changes. The specific APIs on SubstanceLookAndFeel class have been replaced by using skins. You can either create a custom skin from the scratch, or extend an existing skin and override some of its settings. The final release of version 5.0 is scheduled for September and it will have full documentation on the new skinning APIs. Until then, the best place for creating a custom skin is the source code for existing skins. You can see how the Business Blue Steel is implemented and create your own custom skin based on that.

    Note that using watermarks is not recommended for performance reasons. It will make your application about 20-30% slower.

    Thanks
    Kirill

  • Bastien Says:

    ok a release in september is great. Why do you offer watermarks but do recommend not using it?

    Resizing a windows with OS LnF i get a transparent windows only visible through a rectangular border.

    Resizing a windows with substance LnF it resizes the whole Window with the full background which is not good. Because the resizing speed is bad.

    Is it possible to deactivate the substance skin/theme/watermark menu in the top left button of a JFrame? User should not be able to change a skin if the developer has a purpose behind a selected skin.

  • Kirill Grouchnikov Says:

    Bastien,

    Please use the project forums and mailing lists for additional questions on Substance functionality.

    Thanks
    Kirill