|Re: improve performance of tree [message #461341 is a reply to message #461160]
||Wed, 21 September 2005 04:42
| No real name
Registered: July 2009
"Archana" <email@example.com> wrote in message |
> 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;
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
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.
> Thankz Archana
Powered by FUDForum
. Page generated in 0.01408 seconds