This is a migrated thread and some comments may be shown as answers.

Loading Problem with 4000 nodes

5 Answers 194 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
suresh
Top achievements
Rank 1
suresh asked on 19 Mar 2008, 08:36 AM

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

5 Answers, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 19 Mar 2008, 01:33 PM
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
0
Jacky Chau
Top achievements
Rank 1
answered on 01 Jul 2008, 01:45 PM
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. 
0
Oleg
Top achievements
Rank 1
answered on 01 Jul 2008, 02:38 PM
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.
0
Adrian Segovia
Top achievements
Rank 1
answered on 08 Mar 2011, 08:11 PM
Any resolution regarding this issue?
I'm facing a similar problem.

Sincerely

Adrian
0
Veronica
Telerik team
answered on 11 Mar 2011, 04:28 PM
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!
Tags
TreeView
Asked by
suresh
Top achievements
Rank 1
Answers by
Paul
Telerik team
Jacky Chau
Top achievements
Rank 1
Oleg
Top achievements
Rank 1
Adrian Segovia
Top achievements
Rank 1
Veronica
Telerik team
Share this question
or