Loading Problem with 4000 nodes

6 posts, 0 answers
  1. suresh
    suresh avatar
    1 posts
    Member since:
    Mar 2008

    Posted 19 Mar 2008 Link to this post

    Hi,
       I am using Telerik Treeview Control. I have 4000 sub nodes under a main node. its taking so much time in page load (approx 10 minutes). After loading of the page, I am trying to Check the Checkbox of the main node its getting hang my system. there is no response till one hours or more & finally I had to close the window.
       Rather this when I am trying any single node(which do not have any child node) its taking 5-8 seconds to check the checkbox after click on that. Please Suggess the soultion. the code is here underneath.

    ===============================================

     function UpdateAllChildren(nodes, checked)
      {
       var i;
       for (i=0; i<nodes.length; i++)
       {
        if (checked)      
        {
         nodes[i].Check();      
         s=nodes[i].value;
        } 
        else     
         nodes[i].UnCheck();
            
        if (nodes[i].Nodes.length > 0)     
         UpdateAllChildren(nodes[i].Nodes, checked);     
       }
      }

    ==================================================

        This above function is being calling while pressing any checkbox on the tree node.

    Suresh Dev

  2. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 19 Mar 2008 Link to this post

    Hi suresh,

    Telerik RadTreeView does support a large number of nodes, however it can only show a limited number of nodes at a time on client side.

    Imagine 10,000 lines of text and values (say, 100 bytes per line) - this alone makes 1MB HTML size, which actually makes showing 10,000 lines of text at the same time in a web-context virtually impossible. That's why large datagrids use paging for showing data.

    Telerik RadTreeView nodes require even more HTML than that - plus the ViewState required for state management and the javascript make it virtually impossible to show more than, say, 1000 nodes at a time even if the treeview contains 10,000 nodes. After expanding each node, only the nodes that are visible are populated, hence making it possible to minimize the nodes shown on screen until the user navigates to the desired node. This works fine for the majority of tree structures when there are a lot of levels and a relatively small amount of nodes per level - but it will not work if you have, say, 2000 child nodes of a particular node. That is why Load On Demand is used.

    Basically a tree with more than 200 nodes should not be displayed at once without Load On Demand. You can test this with any other treeview products - you will have results similar to ours.

    For details on the matter please refer to the control's documentation under section Controls --> RadTreeView --> Load On Demand Support.

    Regards,
    Paul
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Jacky Chau
    Jacky Chau avatar
    108 posts
    Member since:
    Jun 2005

    Posted 01 Jul 2008 Link to this post

    I dont think the OP's question has been answered.  He's asking for a way to load 4000 sub nodes that's flat.  He's probably already using Load On Demand, but that branch contains 4000 nodes.  Has Telerik considered adding paging to the tree control?  For example, if it detects there are more than X number of nodes to show, it will create a paging mechanism for that branch. 
  4. Oleg
    Oleg avatar
    3 posts
    Member since:
    Dec 2007

    Posted 01 Jul 2008 Link to this post

    I'd like to second that request.  It's not uncommon to have to show 5K children of the same type in a single treeview branch.  Right now we have to split them into 'sub-branches' in our code.
  5. Adrian Segovia
    Adrian Segovia avatar
    11 posts
    Member since:
    Dec 2009

    Posted 08 Mar 2011 Link to this post

    Any resolution regarding this issue?
    I'm facing a similar problem.

    Sincerely

    Adrian
  6. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 11 Mar 2011 Link to this post

    Hello Adrian Segovia,

    At this moment the best performance with RadTreeView when dealing with large ammounts of data (nodes) is by using Web Service load on demand. Please take a look at this demo for an example.

    Regards,
    veronica Milcheva
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top