Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Performance problem with owner-drawn trees on OS X

Hi all,

On OS X an owner-draw tree control gets 3 SWT.MeasureItem events before the SWT.PaintItem event occurs (instead of just 1 as on Windows). Because only in the 1st event the event.details are set correctly, our caching mechanism does not work on OS X:

<https://bugs.eclipse.org/bugs/show_bug.cgi?id=510172>

The performance problem, of course, is that 3 SWT.MeasureItem events are sent to a method that - according to <https://github.com/aerofs/eclipse-platform-swt/blob/master/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet220.java> - are performance relevant:

Therefore it is critical for performance that these methods be as efficient as possible.

My work-around for the above bug is to call our measure method from the SWT.PaintItem event again (a 4th time), because the cached values are not correct on OS X.

This bug can cause the effect, that our applications (that make use of a lot of owner-draw) feel sluggish on OS X.

--
Best regards,
Thomas Singer
=============
syntevo GmbH
http://www.syntevo.com
http://www.syntevo.com/blog


Back to the top