TreeViewer.collapseAll() is slow on OS X [message #528613] |
Wed, 21 April 2010 05:39  |
Eclipse User |
|
|
|
I've the following code in my ViewPart.createPartControl()
// viewer is a TreeViewer
viewer.setInput(input);
viewer.expandAll();
viewer.collapseAll();
There are about 20 parents and each parent have 100 children.
Now, this code when run on Windows XP is very fast. Just after opening the View, the items are shown.
While the same code on Mac OS X is pretty slow, after the View is opened, there is time lag before the items are shown.
If I set redraw to false before calling collapse all and then set it to true again, the results are good -
viewer.expandAll();
viewer.getTree().setRedraw(false);
viewer.collapseAll();
viewer.getTree().setRedraw(true);
So, I've these two questions -
1. Is setting redraw to false, true required?
2. Is this a bug in the SWT implementation for OS X?
|
|
|
|
|
Re: TreeViewer.collapseAll() is slow on OS X [message #530747 is a reply to message #528637] |
Fri, 30 April 2010 12:33  |
Eclipse User |
|
|
|
Hi Sameer,
I'm experiencing the same problem/behavior (TreeViewer.collapseAll() is
slow on OS X) with the Carbon version of 3.5.
This doesn't happen with the Cocoa version though.
Sameer wrote:
> So, I'm contributing to an existing plugin which creates this view for
> me. Now, that plugin is expanding all the items by default but I need
> the items collasped. That's why, I call getTreeViewer().collapseAll()
> myself.
>
> The code snippet provided here is just to show what is happening..
>
> Also, this works fine on Windows XP. The slowness is seen only in mac OS
> X. So, I was wondering if this has something to do with the SWT
> implementation for OS X.
|
|
|
Powered by
FUDForum. Page generated in 0.04642 seconds