TreeViewer and setSelection slow [message #460023] |
Mon, 11 December 2006 15:27  |
Eclipse User |
|
|
|
Originally posted by: danclemson.gmail.com
Hi,
I am setting selections(select 2000+ items at once) on a TreeViewer, using:
viewer.setSelection(new StructuredSelection(list), false);
This approach is very slow, and my GUI is freezed when the setSelection is running.
My tree structure is very simple(only two level, and all the selections are for the leave nodes). Is there anyway to speed up the selection or at least avoid freezing the GUI?
Thanks/dan
|
|
|
|
|
|
|
Re: TreeViewer and setSelection slow [message #460163 is a reply to message #460023] |
Fri, 15 December 2006 14:24  |
Eclipse User |
|
|
|
Did you use a profiler to see what is taking so much time?
Did you call viewer.setUseHashLookup(true)?
If the performance problem is still there, you would have to try to do the
equivalent using just SWT to see if it is SWT (or really your window
system). Otherwise, it would have to be in JFace or your application code,
in which case you really need a profiler.
Boris
"dan liu" <danclemson@gmail.com> wrote in message
news:16448256.1165868898390.JavaMail.root@cp1.javalobby.org...
> Hi,
>
> I am setting selections(select 2000+ items at once) on a TreeViewer,
> using:
>
> viewer.setSelection(new StructuredSelection(list), false);
>
> This approach is very slow, and my GUI is freezed when the setSelection is
> running.
>
> My tree structure is very simple(only two level, and all the selections
> are for the leave nodes). Is there anyway to speed up the selection or at
> least avoid freezing the GUI?
>
>
> Thanks/dan
|
|
|
Powered by
FUDForum. Page generated in 0.06462 seconds