Revision history [back]

click to hide/show revision 1
initial version

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

JLI gravatar image JLI

Large Tree with dynamic columns

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.

Large Tree with dynamic columns

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.

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