Expand all perfomance

9 posts, 1 answers
  1. Konstantin
    Konstantin avatar
    16 posts
    Member since:
    Oct 2010

    Posted 14 Apr 2011 Link to this post

    I have huge list of data (9000 lines). 500 of them are parents all other are first-level children.
    When I use ExpandAllHierarchyItems to expand all. It take at least 3-4 seconds. Is it possible to improve performance in this operation?
  2. Konstantin
    Konstantin avatar
    16 posts
    Member since:
    Oct 2010

    Posted 15 Apr 2011 Link to this post

    I use profiler and found that 70% time systems spends in PopulateInternalList method of QueryableCollectionView.

    Also I found that when I collapse or extand only one item. RadTreeListView re-populates internal collection. AS a result expanding only one item take same time as expanding all. It's a huge amount time for me.

    For Expand one, I did some additional research and found on each collapse/expand  RefreshViewAndParents method of HierarchicalCollectionView is called. This method has following implementation:

    private static void RefreshViewAndParents(HierarchicalChildCollectionView childView)
    {
      using (IEnumerator<HierarchicalCollectionViewBase> enumerator = childView.SelfParentsAndRoot.GetEnumerator())
      {
        while (enumerator.MoveNext())
        {
          enumerator.get_Current().RefreshCore();
        }
      }
    }

    Statemet childView.SelfParentsAndRoot returns two lines:

    1. Expanding/Collapsing line
    2. Whole root collection

    As a result whole collection is refreshed

     

     PS. I use 2011 Q1

  3. DevCraft banner
  4. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 20 Apr 2011 Link to this post

    Hello,

     Indeed this is how our RadTreeListView works. The tree list will create a flat collection from your hierarchical data and will manipulate this collection during expand/collapse, sort, filter, etc. Earlier versions of the component used Add and Remove collection changed actions during expand collapse of child items to notify the UI, however this proved to be very very slow and we've changed this to Reset.
    Now every time you expand or collapse an item the hierarchical collection will mass remove/add respective child items and will raise Reset collection change in order to notify the container generator that all containers need to be regenerated. 

    We've started (more than 2 months ago) huge optimization on our data layer (used in both RadGridView and RadTreeListView) related exactly to multiple add/remove operations and we believe that after we plug this completely we may find a way to optimize the expand/collapse of the treelist and the hierarchical collection itself.

    The official release of this optimization will be Q2 2011 (middle of July) and we will do our best to provide faster treelist. 

    Regards,
    Vlad
    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
  5. Konstantin
    Konstantin avatar
    16 posts
    Member since:
    Oct 2010

    Posted 25 Apr 2011 Link to this post

    Great news.

    But, could you provide recommendations how to tune performance for current vresion. I'm interesting in very special case: two-levels only hierarchy.
  6. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 28 Apr 2011 Link to this post

    Hello Konstantin,

     Unfortunately currently we cannot offer you any other performance improvements with the current version when you expand all items at once. 

    Kind regards,
    Vlad
    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
  7. Konstantin
    Konstantin avatar
    16 posts
    Member since:
    Oct 2010

    Posted 28 Jul 2011 Link to this post

    I use Q2 2011 and still see performance issue with expanding data.
    It looks like that expand one and expand all costs the same amount of resources.
  8. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 28 Jul 2011 Link to this post

    Hi Konstantin,

    Please try our latest build for Q2 2011 - the expand all performance will be much better!

    Greetings,
    Vlad
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  9. Konstantin
    Konstantin avatar
    16 posts
    Member since:
    Oct 2010

    Posted 28 Jul 2011 Link to this post

    Do you mean latest Internal Build?
  10. Answer
    Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 28 Jul 2011 Link to this post

    Hi,

     Indeed I'm referring to our latest internal build for Q2 2011. 

    All the best,
    Vlad
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Back to Top
DevCraft banner