Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Tree problem on Windows

3.1M6 has a performance problem adding things to Trees which traces back to some new API added to address a gtk performance issue. Under gtk it used to be an O(n^2) operation to add an item to a Tree. Now gtk is better but Windows is O(n^2). Building a tree with just 1200 items takes over a minute on a relatively fast machine.

The problem is that in order to find the n'th item in the children of a tree node on Windows it starts with the 0th item and does a linear search, probing each child in order. That would be slow enough but it's worse because each probe  does a JNI call to send a Windows message, and the message comes back through JNI for more processing.

Previously the viewer algorithm fetched all children of the tree node at once, but it did this for every item inserted.

I've opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=91046 to track this.



Back to the top