ViewerSorter performance [message #628799] |
Fri, 24 September 2010 07:55 |
Jan Koehnlein Messages: 760 Registered: July 2009 Location: Hamburg |
Senior Member |
|
|
Hi,
my tree viewer shows a relatively plain model (2000 elements in the same
node). When I use a ViewerSorter, the Display thread is blocked for
about 20s (!) before showing the sorted tree. Profiling does not reveal
anything special, most of the time is spent in some SWT internal stuff.
When I sort the elements in the IContentProvider instead, sorting time
drops below 3s. Still a lot but I can live with that.
Am I missing something?
Regards
Jan
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
---
Get professional support from the Xtext committers at www.typefox.io
|
|
|
|
Re: ViewerSorter performance [message #629418 is a reply to message #628800] |
Tue, 28 September 2010 08:27 |
Jan Koehnlein Messages: 760 Registered: July 2009 Location: Hamburg |
Senior Member |
|
|
As sorting is usually triggered on/off, I set the viewer after setting
the input. In the meantime, I moved sorting into the content provider
which fits my needs.
Thanks for your help
Jan
Am 24.09.10 10:05, schrieb Tom Schindl:
> Hi,
>
> Are you setting the sorter after the setInput()? You could try turning
> of redraw before setting the new sorter this might help.
>
> Tom
>
> Am 24.09.10 09:55, schrieb Jan Koehnlein:
>> Hi,
>>
>> my tree viewer shows a relatively plain model (2000 elements in the same
>> node). When I use a ViewerSorter, the Display thread is blocked for
>> about 20s (!) before showing the sorted tree. Profiling does not reveal
>> anything special, most of the time is spent in some SWT internal stuff.
>>
>> When I sort the elements in the IContentProvider instead, sorting time
>> drops below 3s. Still a lot but I can live with that.
>>
>> Am I missing something?
>>
>> Regards
>> Jan
>
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
---
Get professional support from the Xtext committers at www.typefox.io
|
|
|
Powered by
FUDForum. Page generated in 0.03307 seconds