1 Reply Latest reply on Jan 31, 2010 7:25 PM by Nick Belaevski

    tree nodes - need your advice

    soso xuc Newbie

      Hi all

       

      Hi Nick

       

      I think this question is for u because u are author of  tree node class and its subclasses.

       

      I have asked question about state saving and the answer worked, my servers memory consumption have reduced but for a bit, now i have another question.

       

      as i mentiond i have tree with 40000 nodes.

       

       

       

      the top nodes are only about 100 i.e. 100 top nodes with 4000 child each.

       

      for each user i want to render tree with only 1 top node (and 4000 child of course ) and keep this data in session (it never changes during session).

       

      Now i select this nodes from database each time user connects (i.e. 4000 records are selected every time) and keep in servers memory

       

       

       

      my idea is :

      to keep only one copy of 40000 node tree in tomcats memory (in application scope bean for example) to save memory.

       

      the question is :

      how can i use this tree not changing it and not saving another copy of this nodes in memory and displaying only one part of it to client.

       

       

      Thanks in advance

        • 1. Re: tree nodes - need your advice
          Nick Belaevski Master

          soso_xuc wrote:

           

          the question is :

          how can i use this tree not changing it and not saving another copy of this nodes in memory and displaying only one part of it to client.


          Multiple trees can share the same data model (e.g. session- or application-scoped). Tree component doesn't modify model by itself, only nested input components (if any) bound to tree nodes can do that.

           

          And as you've already switched caching off using attribute, component won't create copies of data model.