bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug swing/24214] New: JTree performance problems with large model


From: hendrich at informatik dot uni-hamburg dot de
Subject: [Bug swing/24214] New: JTree performance problems with large model
Date: 5 Oct 2005 13:31:45 -0000

While JTree from current classpath cvs head (as of 2005.10.05) works fine
for small tree models with a few dozen nodes, the response times become
inacceptable (seconds, minutes) for large trees. I have several apps that
expect to handle tenthousands of nodes (e.g. 50 image directories with
200 images each).

The attached testcase creates a DefaultMutableTreeNode tree with user-specified
number of levels and number-of-nodes-per-level, then displays that tree in a
JTree in a JFrame. (No JScrollPane is used to demonstrated the behavior of the
naked JTree component. See follow-up bug reports for the scrolling fun).

Usage:
java PRxxx <nodes-in-first-level> [<nodes-in-second-level> ...]
Examples:
java PRxxx 2 2 2          - three levels with 2 nodes each, 2*2*2 nodes total
java PRxxx 2 2 2 2 2  2 2 2 2 2  - 10 levels, 1024 nodes total
java PRxxx 10 10 10 10           - 4 levels, 10000 nodes total
java PRxxx 50 200                - 2 levels ("50 directories, 200 images each")
...

Wait for the tree to be displayed, then try to select (expand/collapse) 
tree nodes via mouse-clicks or via keyboard-navigation. In general, 
repainting seems to be a little faster for the topmost nodes, but gets
pretty slow for 1000 nodes and more.

The tables below show some example performance data; but they don't reflect
that classpath seems to require multiple seconds on every single repaint
(how can I measure that?) and becomes totally unresponsive.

Performance data:

java -Xmx300m PRxxx [sizes]
jamvm -mx300m -ms300m PRxxx [sizes]

java -Xmx300m PRxxx [sizes] in milliseconds:
                           GUI  tree  packed  packed  
size: 10                   316     2     121       5       
size: 10 10                325     2     121       4       
size: 10 10 10             339    12     121       3       
size: 10 10 10 10          348   104     120       6       
size: 10 10 10 10 10       317   551     120       6       

jamvm -mx300m -ms300m PRxxx [sizes] in milliseconds

size: 10                   616     2      41       41    
size: 10 10                652     3      51       73     
size: 10 10 10             617    13     121       47      
size: 10 10 10 10          620   106     902       46      
size: 10 10 10 10 10       626  1246    9850      671


-- 
           Summary: JTree performance problems with large model
           Product: classpath
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: swing
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hendrich at informatik dot uni-hamburg dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24214





reply via email to

[Prev in Thread] Current Thread [Next in Thread]