0

Large Tree with dynamic columns

asked 2013-03-14 07:21:49 +0800

JLI gravatar image JLI
11 1

updated 2013-03-14 09:49:09 +0800

dennis gravatar image dennis
3669 1 6
http://www.javaworld.com....

Hi,

ich would like to build a large tree that has several dynamic columns, i.e. depending on a selection made by the user, the number of columns changes at runtime.

Currently, I have a (functionally) working solution, however, with the number of dynamic columns increasing, the performance of page suffers significantly.

The tree itself has only two levels with approx. 200 Nodes in the top level and 2000 Nodes at the second level. I am using the mold "paging" und I am currently using a DefaultTreeModel to hold the tree data. Building up the tree model is quite fast, apparently the significant part of building the visual tree is spent in the rendering phase, especially for attaching the property change listeners (if I use @init instead of @load for the dynamic columns, the performance is much better - unfortunatly this only works for the first request but then does not reflect changes made by the user).

I have also noticed, that ZK seems to render the entire tree, not only the 20 elements that are shown on one page.

Are there any suggestions where to look into? First of all, I would like ZK to only render the relevant part of the tree. I already tried to implement my own AbstractTreeModel but maybe I did not get it right. For example, the method getChildCount() seems to be called for every top-level node regardless whether it is currently visible or nor. How could I determine for which nodes to return the correct count and for which to return the dummy count (0)?

Any help is appreciated.

Regards,

J.

delete flag offensive retag edit
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2013-03-14 07:21:49 +0800

Seen: 22 times

Last updated: Mar 14 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More