RadTreeView with thousands of nodes is very slow, takes too long to expand/collapse

4 posts, 0 answers
  1. Faye
    Faye avatar
    2 posts
    Member since:
    May 2011

    Posted 06 Jun 2011 Link to this post

    Performance of RadTreeView with thousands of nodes is very slow, takes too long to expand/collapse:

    ~3000 nodes – expand: ~2 mins 32 secs, collapse: ~28 secs

    ~9000 nodes – expand: ~27 mins 26 secs, collapse: ~4 mins 57 secs

    Note: For hundreds of nodes, performance is slightly better but still quite slow: ~100 nodes – ~1.5 secs. Scrolling is also badly delayed.


    I am using a trial version of the RadControls for Silverlight 4, Windows XP, IE6. TreeView’s IsVirtualizing=true and VirtualizationMode=Hierarchical. Items in the TreeView use a simple HierarchicalDataTemplate which consists of an Ellipse, Image, TextBlock and TextBox. ItemsSource points to a class that generates dummy data using classes with typical properties (ex. string, bool, struct, DateTime).


    The tree structure used for testing is 6 levels deep and there are thousands leaf nodes:






                                                                                    <thousands of leaf nodes>


    The TreeView is declared as follows:

    <telerik:RadTreeView ItemsSource="{Binding Source={StaticResource DataSource},


                                             ItemTemplate="{StaticResource TreeItemTemplate}"









    Even tried turning off animation (telerik:AnimationManager.IsAnimationEnabled="False") as mentioned in some forums but this did not yield a better result.


    I noticed though, that using RadTreeListView has no problems with ~3000 or ~9000 nodes:

    ~3000 nodes – expand: ~0.9 secs, collapse: ~0.3 secs

    ~9000 nodes – expand: ~1.2 secs, collapse: ~0.5 secs

    Am I missing something when it comes to TreeView?


    Any suggestions on how to improve the TreeView performance for a large number of nodes? This is too slow considering UI virtualization is already enabled and the data are merely objects, no interaction with any database or server.

  2. Petar Mladenov
    Petar Mladenov avatar
    2891 posts

    Posted 08 Jun 2011 Link to this post

    Hi Faye,

    We are aware of the fact that the current version of RadTreeView needs performance optimization when ExpandAll Collapse all operations are used. We have logged this previously in our PITS(TreeView: Too many TreeViewItems are created internally when using virtualization) and you are able to vote for it in order to increase its development priority.
    However, if you do need a large number of expand operations you could use RadTreeListView instead of RadTreeView. On the other hand, if you need to expand only particular nodes at a time , I think the RadTreeView could fit nicely in your scenario. You can examine this performance demo (showing generation of millions of items) and this blog post showing how to expand a particular node if you know its path from the tree`s root node.
    Please let us know if you need more info on this. We would be glad to advice you.

    Kind regards,
    Petar Mladenov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Developer
    Developer avatar
    2 posts
    Member since:
    Jun 2012

    Posted 18 Jun 2012 Link to this post


    We use a RadTreeView and RadGrid telerik controls in a page. While expanding and colapsing the tree nodes in RadTreeView, the sync is lost between the grid and TreeView.When I expand the tree node, the tree is expands behind the grid(Grid doesn't move down). When I move the mouse away the grid moves down. Same thing happens with the collapse. When I collapse the tree, grid doesn't move up, which results in a gap between the TreeView and the Grid. When I move the mouse the Grid moves up .
    Please help me resolve this issue.

    Thanks In Advance
  5. Petar Mladenov
    Petar Mladenov avatar
    2891 posts

    Posted 21 Jun 2012 Link to this post

    Hi Developer ,

    Could you please elaborate a bit on your scenario?  Is it possible for you to send us your XAML or an isolated sample in a new support ticket?It will be also great if you can send us a captured video with the issue you have come up with. What is the number of items in the RadTreeView and in the RadGridView? 

    Kind regards,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top