myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jiang, Jane \(NIH/NCI\) [C]" <>
Subject tree 2 -- lazy loading.
Date Thu, 07 Sep 2006 20:18:18 GMT
I've been using the 2nd method of tree2 lazy loading I learned from the wiki page.  I overwrote
the getChildren() method to load in the children.  It works fine.  I am very surprised that
the tree slowed down.

I tried to track down the problem and found that every time I try to expand one node, the
getChildren() method gets called for all visible nodes.  This behavior defeated half of the
purpose of lazy loading since the sibling nodes actually get loaded right away.  So we are
actually loading one layer at a time, not one node at a time.  To make the matter worse, if
a node has no child nodes after the first round, the super.getChildren().size() == 0 is always
true.  So we repeatly goes to the database and try to find more children for those nodes.

Has any one found a way to work around this problem?  Is there a better way to do lazy loading?



-----Original Message-----
From: Andrew Robinson []
Sent: Monday, July 17, 2006 6:57 PM
To: MyFaces Discussion
Subject: Re: tree 2 -- lazy loading.

Check the archives. You will see my post about a lazy-loading AJAX
tree for jsf-comp

On 7/17/06, <> wrote:
> Quick question:
> Is the MyFaces Tree2 lazy loadable?  Any examples anywhere?
> Thanks in advance,
> --Brad.

View raw message