improve performance of tree [message #461160] |
Mon, 19 September 2005 02:46  |
Eclipse User |
|
|
|
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 00:42  |
Eclipse User |
|
|
|
"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
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04797 seconds