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

Expand all perfomance

8 Answers 160 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Konstantin
Top achievements
Rank 1
Konstantin asked on 14 Apr 2011, 04:27 PM
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?

8 Answers, 1 is accepted

Sort by
0
Konstantin
Top achievements
Rank 1
answered on 15 Apr 2011, 02:05 PM

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

0
Vlad
Telerik team
answered on 20 Apr 2011, 06:51 AM
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
0
Konstantin
Top achievements
Rank 1
answered on 25 Apr 2011, 01:14 PM
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.
0
Vlad
Telerik team
answered on 28 Apr 2011, 01:32 PM
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
0
Konstantin
Top achievements
Rank 1
answered on 28 Jul 2011, 02:37 PM
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.
0
Vlad
Telerik team
answered on 28 Jul 2011, 03:17 PM
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!

0
Konstantin
Top achievements
Rank 1
answered on 28 Jul 2011, 03:36 PM
Do you mean latest Internal Build?
0
Accepted
Vlad
Telerik team
answered on 28 Jul 2011, 03:38 PM
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!

Tags
TreeListView
Asked by
Konstantin
Top achievements
Rank 1
Answers by
Konstantin
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or