Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » TreeViewer refresh performance
TreeViewer refresh performance [message #513534] Wed, 10 February 2010 14:10 Go to next message
philipp huebner is currently offline philipp huebnerFriend
Messages: 65
Registered: July 2009
Member
Hi folks,

I've messured that my tree takes over 2 seconds for a refresh on a element in atree with about 10000 elements. Thats too slow for our use cases; is there a possibility to speed this up or sth like a SWT.Virtual flag for trees ....
Re: TreeViewer refresh performance [message #513549 is a reply to message #513534] Wed, 10 February 2010 14:31 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
did you turn off redrawing (tree.setRedraw(false))?

Tom

Am 10.02.10 15:10, schrieb philipp huebner:
> Hi folks,
>
> I've messured that my tree takes over 2 seconds for a refresh on a
> element in atree with about 10000 elements. Thats too slow for our use
> cases; is there a possibility to speed this up or sth like a SWT.Virtual
> flag for trees ....
Re: TreeViewer refresh performance [message #657102 is a reply to message #513549] Tue, 01 March 2011 15:39 Go to previous messageGo to next message
philipp huebner is currently offline philipp huebnerFriend
Messages: 65
Registered: July 2009
Member
ahh....nope. But why....Then you disable the entire tree. I want still draw it....
Is JFace's Tree Performance really that bad? That can't be possible. It must be able to handle this....
Re: TreeViewer refresh performance [message #657120 is a reply to message #657102] Tue, 01 March 2011 15:57 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
A refresh might mean in your case many many micro updates and to make
them into one big flush you do:

try {
tree.getControl().setRedraw(false);
// Make you UI-Updates
} finally {
tree.getControl().setRedraw(true); // Flush all changes at once
}


Am 01.03.11 16:39, schrieb philipp huebner:
> ahh....nope. But why....Then you disable the entire tree. I want still
> draw it.... Is JFace's Tree Performance really that bad? That can't be
> possible. It must be able to handle this....
Re: TreeViewer refresh performance [message #657261 is a reply to message #657120] Wed, 02 March 2011 08:48 Go to previous messageGo to next message
philipp huebner is currently offline philipp huebnerFriend
Messages: 65
Registered: July 2009
Member
Ok I understand; but does this really work. I have really one call of tree->refresh. Whre do I have to add this code?


Re: TreeViewer refresh performance [message #657262 is a reply to message #657261] Wed, 02 March 2011 08:53 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Exactly there where i had my // Make you UI-Updates comment.

Tom

Am 02.03.11 09:48, schrieb philipp huebner:
> Ok I understand; but does this really work. I have really one call of
> tree->refresh. Whre do I have to add this code?
>
>
>
Re: TreeViewer refresh performance [message #657272 is a reply to message #657120] Wed, 02 March 2011 09:54 Go to previous messageGo to next message
philipp huebner is currently offline philipp huebnerFriend
Messages: 65
Registered: July 2009
Member
But I have already cached my update events.
I have a customized tree viewer for an emf model. There are many unnecessary update events which are cached to one update, but this one update is still very slow.
Disable redrawing could only be a solution if you do it in an inherited method of the tree itself. I
Re: TreeViewer refresh performance [message #665898 is a reply to message #513534] Mon, 18 April 2011 05:07 Go to previous message
jim liu is currently offline jim liuFriend
Messages: 37
Registered: February 2011
Location: shanghai
Member
do not refresh all tree,just refresh a tree node item?

java eclipse Search
http://javafind.appspot.com/
Previous Topic:Different cell editors in different rows of the same table column
Next Topic:[DataBinding] binding to an ElementListSelectionDialog
Goto Forum:
  


Current Time: Tue Mar 19 02:53:15 GMT 2024

Powered by FUDForum. Page generated in 0.02123 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top