Board index » jbuilder » how many nodes that JTree support?

how many nodes that JTree support?


2003-10-25 12:05:23 AM
jbuilder5
Hi, all
I'm have a small problem with JTree.
When load 5000 nodes into a JTree, it's
works terribly slow.
any idea? or how many nodes that JTree support?
TIA.
 
 

Re:how many nodes that JTree support?

JTree supports an unlimited number of nodes. However, if you have thousands
of them all as the children of a single node, performance will suffer.
Another possible cause of the performance problem is that 5000 nodes may
take a considerable amount of memory. You may want to consider rewriting
your TreeNode implementation to use some kind of disk-based access instead.
--
Check out our latest white papers at
www.datadevelopment.com/papers/index.html
BladeNET Scores With Borland Enterprise Tools
Team Development with JBuilder and Borland Enterprise Server
Dolphin Data Development Ltd.
www.datadevelopment.com/
"Chris" < XXXX@XXXXX.COM >wrote in message
Quote
Hi, all

I'm have a small problem with JTree.
When load 5000 nodes into a JTree, it's
works terribly slow.

any idea? or how many nodes that JTree support?

TIA.


 

Re:how many nodes that JTree support?

"Chris" < XXXX@XXXXX.COM >writes:
Quote
I'm have a small problem with JTree.
When load 5000 nodes into a JTree, it's
works terribly slow.
You need to look into optimizations like
- Not using DefaultMutableTreeNode but writing your own more
optimized TreeNode implementation. For instance you could delay
creating child nodes until they are needed.
- Turning off stuff like double buffering and deregistering the JTree
component with the ToolTipManager
 

{smallsort}