Opening big Trees is slow #123
Labels
Performance
A Request for a Performance Improvement
Platform UI
Issue for Platform UI
Student
An Issue to be Addressed By a Student
SWT
Issue for SWT
Problem
Related to #2
Opening big/deep
Tree
s can be quite slow e.g. when showing deep hierarchies the Hierarchy View. For example when opening the hierarchy ofMECU
(meta-model class), it can take some minutes to do it and the UI is frozen.Goal
Steps
Hint
org.eclipse.jface.viewers.AbstractTreeViewer.internalConditionalExpandToLevel(Widget, int, Function<Widget, Boolean>)
, there's currently a hint in the code that points to that but sadly a better implementation can not be provided because it wouldn't work on Linux:Method
You can change the implementation (move the
if (widget instanceof Item it) {...}
to be executed after the otherif
) and use the test snippet below to see how the change breaks the implementation on LinuxTest snippet
You'll see for example that showing the hierarchy of
I3
produces different results.This is with the current (slow) implementation:
This is with the modified (fast) implementation, which wouldn't work properly on Linux:
The text was updated successfully, but these errors were encountered: