Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JFace TableViewer vs TreeViewer - performance

Did anybody else notice that there is a huge performance difference between a TreeViewer and a TableViewer (TreeViewer is much faster).

I have a Table containing CellEditors (with EditingSupport) with about 30 columns and when I'm scrolling it, especially horizontally, it's very slow. Also multi cell selection is slow too.

I changed the table to a Tree (just changed the main TableViewer to a TreeViewer and the specific classes) and there is a huge performance gain.

Why is this? Both table and tree have the same structure, implement and extend the same classes and tree is the one with more functionality. Is this fixed in newer versions of eclipse or should I just migrate my table to a tree with no children?

P.S. I'm using SWT and JFace 3.7 on win7.

Thanks in advance.

like image 766
Lori Avatar asked Feb 14 '14 10:02

Lori


1 Answers

For performance, try using the ILazyTreeContentProvider.

See also this post: Eclipse RCP - ILazyTreeContentProvider implementation is unexpectedly eager.

like image 179
DrKaoliN Avatar answered Nov 17 '22 12:11

DrKaoliN