Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » improve performance of tree
improve performance of tree [message #461160] Mon, 19 September 2005 06:46 Go to next message
Archana is currently offline ArchanaFriend
Messages: 16
Registered: July 2009
Junior Member
Hi,
I have created a tree viewer that have over 100 parents and each node has
1000-3000 children. The performance is extremely slow. It takes about 2-3
minutes to expand the tree. How can improve the performance.
Any suggestions/inputs on the problem?

Thankz
Archana
Re: improve performance of tree [message #461180 is a reply to message #461160] Mon, 19 September 2005 12:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kent.generatescape.com

try: treeViewer.setUseHashlookup(true);

also do you mean in you 1000-3000 nodes in one sub-node?

I have a big tree 50,000 nodes, but never 1000 nodes in one subnode,
normally only about 5 to 10, and I don't have a performance problem. However
there is an issue with like minded nodes, you might want to look at my
latest mail.

"Archana" <archana@yasutech.com> wrote in message
news:f6e2d378e395f91a084e2f60494b1cbb$1@www.eclipse.org...
> Hi, I have created a tree viewer that have over 100 parents and each node
> has 1000-3000 children. The performance is extremely slow. It takes about
> 2-3 minutes to expand the tree. How can improve the performance.
> Any suggestions/inputs on the problem?
>
> Thankz Archana
>
>
Re: improve performance of tree [message #461203 is a reply to message #461160] Mon, 19 September 2005 13:39 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi Archana,

SWT.VIRTUAL will be added as a style to Tree quite soon, which will help
cases like yours (similar to creating a Table/TableViewer with several
thousand items). Add yourself as a CC to
https://bugs.eclipse.org/bugs/show_bug.cgi?id=92341 .

Grant

"Archana" <archana@yasutech.com> wrote in message
news:f6e2d378e395f91a084e2f60494b1cbb$1@www.eclipse.org...
> Hi,
> I have created a tree viewer that have over 100 parents and each node has
> 1000-3000 children. The performance is extremely slow. It takes about 2-3
> minutes to expand the tree. How can improve the performance.
> Any suggestions/inputs on the problem?
>
> Thankz
> Archana
>
>
Re: improve performance of tree [message #461341 is a reply to message #461160] Wed, 21 September 2005 04:42 Go to previous message
No real name is currently offline No real nameFriend
Messages: 97
Registered: July 2009
Member
"Archana" <archana@yasutech.com> wrote in message
news:f6e2d378e395f91a084e2f60494b1cbb$1@www.eclipse.org...
> Hi, I have created a tree viewer that have over 100 parents and each node
> has 1000-3000 children. The performance is extremely slow. It takes about
> 2-3 minutes to expand the tree. How can improve the performance.
> Any suggestions/inputs on the problem?

What do you add during expansion? Is it for file folders?
If you have performance problems, virtual tables do not help much.
It could be outside of SWT. For example, if you read file folders
and create node items, then reading file information will take
bulk of time. Try before and after;

tree.setRedraw(false);
.....
tree.setRedraw(true);

Within this block, adding 1000~3000 tab items per se should be donw
within a few second, probably less than a second. In addition, try to add
or
expand only it is needed, i.e., use lazy-evaluation methods.

Note that virtual tables can save Java Runtime resources, especially
heap memory space, if you have millions of entries. However you
need to know the number of elements and stable entry information.
Since your program will spend most of time getting that information,
virtual table may not give you much speed.

In a nutshell, use the setRedraw() and add expansion information wisely.
Also, optimize the real source of speed problem, which will be outside
SWT domain, e.g., IOs, database connections, etc.

Hope this will easy your problem.

Regards.


>
> Thankz Archana
>
>
Previous Topic:HTML text rendering in a text widget (like JLabel in Swing)?
Next Topic:CTabFolder not displaying shared controls
Goto Forum:
  


Current Time: Fri Apr 19 21:49:13 GMT 2024

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

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

Back to the top