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

TreeListView Peformance Issue

37 Answers 387 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Minwei
Top achievements
Rank 1
Minwei asked on 21 Jan 2011, 11:40 AM
We occured a performance problem when developing.

The speed of expanding the child is getting slower and shower with the increase of columns.

We now have about 50 columns to display. It is very slow.
Could you help me to improve the performance?

Another question:
If the first item is expanding, it takes 1 seconds.
If the second item is expanding, it takes 1.5 seconds( with the first item expanded)
If the thrid item is expanding, it takes 2 seconds (with first two items expanded)

That is to say, more expanded items, lower performance.

Is there any advice?

Thanks

37 Answers, 1 is accepted

Sort by
0
Minwei
Top achievements
Rank 1
answered on 21 Jan 2011, 02:47 PM
Any idea?
0
Veselin Vasilev
Telerik team
answered on 26 Jan 2011, 04:42 PM
Hi Minwei,

We have a similar issue logged in our public issue tracking system. You can track its progress here.
In addition, you can check the performance troubleshooting article. It is for RadGridView, but everything applies to RadTreeListView as well.

Kind regards,
Veselin Vasilev
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Alexey
Top achievements
Rank 1
answered on 29 Mar 2011, 02:59 PM
I am also faced with such problem. To long expanded/collapsed rows. Any progress?
0
Vlad
Telerik team
answered on 29 Mar 2011, 03:01 PM
Hi,

 What's your treelist version? 

Best wishes,
Vlad
the Telerik team
0
Alexey
Top achievements
Rank 1
answered on 29 Mar 2011, 03:15 PM
2010.3.1314.1040
0
Ivano
Top achievements
Rank 1
answered on 13 Jul 2011, 09:28 AM
Hi

Still slow in version 2011.1.0419.1040.
Any news?

Sincerely


0
Vlad
Telerik team
answered on 18 Jul 2011, 01:55 PM
Hello,

 The original post in this thread is related to many columns (horizontal virtualization) performance which was resolved in Q1 2011 since we rewrote the entire horizontal virtualization for both treelist and grid - you can check our 1000 columns demo here:
http://demos.telerik.com/silverlight/#GridView/UIVirtualization

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!

0
Konstantin
Top achievements
Rank 1
answered on 28 Jul 2011, 02:36 PM
I have same issue with expanding rows even if I use RowVirtualization.
0
Vlad
Telerik team
answered on 28 Jul 2011, 03:18 PM
Hello Konstantin,

 I've just replied to your post here.

Best wishes,
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 29 Jul 2011, 12:43 PM
Q2 2011 has much better performance on expanding from internal collections point-of -view.But When I expand/collapse just one item. MeasureOverride is called for all visible items.
In my case I have 37 rows (5 parents in two level hierarchy). on each expand/collapse MeasureOverride is called 480 times (13 visible columns), AS a result each expand/collapse takes up to 2 seconds on my Core i7.

Is it possible to re-measure only expanded/collapsed and new visible rows?
0
Vlad
Telerik team
answered on 03 Aug 2011, 02:02 PM
Hi Konstantin,

 Indeed we have plans to introduce exactly such smart expand/collapse (measure only needed items) and we are working currently on this. In the meantime you can check our next internal build (next Monday) - we were able to add massive performance improvements for initial load, expand all and filtering.

I'm attaching also an example application with our latest binaries (from Today) to demonstrate the component performance after latest optimization - RadTreeListView is bound to three level hierarchy of total 1 million items. 

All the best,
Vlad
the Telerik team

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

0
Konstantin
Top achievements
Rank 1
answered on 03 Aug 2011, 03:23 PM
I've just played with your sample code. I did following changes:
1. In MainPage.xaml.cs (100 top items with 5 children each)
DataContext = new ObservableCollection<MyObject>(from i in Enumerable.Range(0, 100)
                                                 select new MyObject()
                                                     {
                                                         ID = i,
                                                         Name = string.Format("Name{0}", i),
                                                         Items = new ObservableCollection<MyObject>(from j in Enumerable.Range(0, 5)
                                                                                                    select new MyObject()
                                                                                                    {
                                                                                                        ID = j,
                                                                                                        Name = string.Format("Name{0}", j),
                                                                                                    })
                                                     });
2. MainPage.xaml (I add a lot columns)
<telerik:RadTreeListView Margin="10" x:Name="RadTreeListView1" ItemsSource="{Binding}" Grid.Row="1"
                         AutoGenerateColumns="False" HierarchyColumnIndex="0" EnableColumnVirtualization="True" EnableRowVirtualization="True">
    <telerik:RadTreeListView.ChildTableDefinitions>
        <telerik:TreeListViewTableDefinition ItemsSource="{Binding Items}" />
    </telerik:RadTreeListView.ChildTableDefinitions>
    <telerik:RadTreeListView.Columns>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Id}"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"/>
    </telerik:RadTreeListView.Columns>
</telerik:RadTreeListView>

Then I expand only one item, it still cause MeasureOverride for all visible rows. I attached screenshot of profiler. You could see that GridRowItem.MeasureOverride was called 38 times (it's excatly how many rows are visible).

0
Vlad
Telerik team
answered on 03 Aug 2011, 03:29 PM
Hi Konstantin,

Measure optimization is not included in this build - we will do our best to provide it as soon as possible.

Kind regards,
Vlad
the Telerik team

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

0
Tim
Top achievements
Rank 1
answered on 17 Sep 2011, 04:54 PM
Hello Vlad,

any progress on this topic? That would be really great as the performance is really awful!
In fact, in our scenario it is not possible to use the control although we followed all performance guidelines for the RadGridView.
Thanks a lot for any information! And a HUGE thanks for an update! :) Konstantin, thanks for profiling...

Greetings and all the best,
Tim.

0
Vlad
Telerik team
answered on 19 Sep 2011, 08:09 AM
Hi Tim,

Expand all/collapse all, filtering. etc. optimization will be part of our upcoming official Q2 2011 SP1 this week. We are still working on single item expand/collapse performance - most probably this will be added for our Q3 2011 (middle of November).

Kind regards,
Vlad
the Telerik team

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

0
Tim
Top achievements
Rank 1
answered on 19 Sep 2011, 09:12 AM
Hi Vlad, that are good news! Thanks a lot for your feedback. Will there be also an internal build a little bit earlier - I am only asking because there is an exhibition this week! ;) Thanks again, Tim.
0
Hristo
Telerik team
answered on 19 Sep 2011, 03:53 PM
Hi Tim,

We are in the process of preparing our Q2 2011 SP1 which is expected in a couple of days. No internal builds will be available until we ship the service pack.

Kind regards,
Hristo
the Telerik team

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

0
Marcos Sampaio
Top achievements
Rank 1
answered on 08 Dec 2011, 02:29 PM
Hi,

I'm using version 2011.3.1116.1040 of the TreeListView and I still have the same performance issue. I read all the topics about performance of GridView and nothing.

Look like on each expand event TreeListView loads ALL rows again. I have more than 15k data and after deploy I could get 30-40k. Yes I already tried to load on demand and nothing. The most columns I have the worst is performance and in my case the number of rows isn't variable, columns are. I have the same app on a older version of TreeListView (2010.2.812.1040) and it doenst have the same issue. I can't rollback cuz I use lots of new features.

Plz, help me.

Ty,
Marco.
0
Tony
Top achievements
Rank 1
answered on 11 Mar 2012, 07:20 AM
Hi,


We're also experiencing this issue, with version 2011.3.1220.1050 of the Telerik controls. It takes 1-2 seconds to expand or collapse a row in the TreeListView. This is with around 25 top-level rows, and 2-3 sub-rows below each top-level row. Our grid has roughly 25 columns.

We see a CPU spike while this is happening. The VS profiler shows that 82% of the CPU time is being spent (inclusively) in Telerik.Windows.Controls.GridView.GridViewScrollViewer.MeasureOverride.

We tried setting the AutoLoadHierarchy and Enable{Column,Row}Virtualization properties, but this didn't significantly improve things. Is there any other way to improve the performance?


Thanks.
0
Vlad
Telerik team
answered on 12 Mar 2012, 03:38 PM
Hi,

 How many cells you have visible in the treelist view port? Generally this component will recreate all rows during expand collapse due to the nature of the hierarchical collection used internally. Please consider RadGridView and/or RadTreeView if you do not need hierarchical sorting and/or filtering.

Kind regards,
Vlad
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Konstantin
Top achievements
Rank 1
answered on 12 Mar 2012, 03:49 PM
I still have the same issue. treelist View Port has 30 rows and 12 columns. In average only 5 rows are exanded collapsed, but each time TreeListView does MeasureOverrride for all 30*12 columns. Instead of 5*12.
0
Tony
Top achievements
Rank 1
answered on 12 Mar 2012, 06:50 PM
Hi Vlad,


Thanks for your reply. I just checked - I have 12 rows * 21 columns visible, so 252 cells.

We don't need hierarchical sorting or filtering. We need sorting, but it is OK if the sorting only happens at the top level.

What we do need is to be able to view both the top-level items and the sub-items in a grid, with the sub-items hidden until the user chooses to view them. Is it possible to achieve this with the TreeView or GridView?

I've attached a screenshot of how it looks now.


Thanks.
0
Vlad
Telerik team
answered on 13 Mar 2012, 09:58 AM
Hello Tony,

I've made custom treelist like component based on RadGridVew to illustrate you how to achieve your goal. Please check the attached project for reference!

What I've made actually is:
 - custom expand column with logic for indentation and expand/collapse
 - since I'm using IsExpanded GridViewRow property (associated normally with hierarchy) to persists the expanded state of rows automatically (however this is not normal hierarchy) I've removed the so called "hierarchy presenter" from the row template. You can check the new row template/style in application resources
- in RowIsExpandedChanged event handler of the grid I've placed my custom logic for expand/collapse which is actually add/remove items in the main collection bound to the grid.

All the best,
Vlad
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Tony
Top achievements
Rank 1
answered on 13 Mar 2012, 11:32 PM
Hi Vlad,

Thank you! This example looks good. We'll try it out and let you know if we run into any issues with it.

Thanks again.
0
Jatinder
Top achievements
Rank 1
answered on 20 Mar 2012, 03:43 PM

Hi Vlad 

I am having the same issues with really bad performance. 

Both scrolling horizontally and with expanding rows.

I have 20 columns and a mere 50 rows in my test application. With real data i expect the same columns but with maybe 100-300 rows.

I am using latest internal binaries. I am using no converters, no style selectors (i am using column groups but even removing those dont help).... so all in all a very vanilla test.

My horizontal scrolling is slow and choppy with just 25 columns

My Expanding rows is dreadful almost like a 1-2 seconds to expand!!!

Looking at the concerns before this post with measureoveride being called for each cell and row I am not sure what i should be doing to fix the performance?? Apart from like your previous post which to stop using the treelist and try to hack into the gridview to make my scenario work?

As for my use cases - i dont need any filtering, sorting.

Just expanding rows, drag and dropping rows, cell editing, column groups

Please help. Since this is an old thread - ill post all of the above in a new thread to get visibility.

0
Vlad
Telerik team
answered on 20 Mar 2012, 03:46 PM
Hello,

 I can only suggest you to consider my recently attached application if you do not need hierarchical sorting and/or filtering. 

All the best,
Vlad
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
AKROS
Top achievements
Rank 1
answered on 21 Mar 2012, 11:09 AM
Please Telerik, improve h-scroll and item expanding performance for the next release.
We all really need this !!!!
0
Tim
Top achievements
Rank 1
answered on 21 Mar 2012, 05:50 PM
Yes telerik! That would be really great! Please, a little bit performance! ;)
0
Harish
Top achievements
Rank 1
answered on 26 Apr 2012, 12:31 PM
I was looking for similar feature just wanted to know how to achieve grouping freature in this.
0
Vlad
Telerik team
answered on 15 May 2012, 07:39 AM
Hello,

 I'm happy to announce that we've managed to optimize the expand/collapse performance greatly in our latest internal build (the official Q2 release is scheduled for first week of June). I'm attaching small demo application for reference.

Kind regards,
Vlad
the Telerik team

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

0
AKROS
Top achievements
Rank 1
answered on 15 May 2012, 08:58 PM
Hi Vlad,

I just tested the latest internal build with our silverlight application and the performance (expand/collapse) is much much more better !
I hope that for the next release you can do the same with merged header (column groups).

Keep going like this !!

All the best,
Nicolas
0
Tim
Top achievements
Rank 1
answered on 16 May 2012, 10:45 AM
Hi Vlad,

that's really good news! A big thanks to the telerik team! Just like AKROS said: Keep going like this !!
All the best,Tim.
0
Greg
Top achievements
Rank 1
answered on 04 Jun 2012, 02:45 PM
Are these improvements included in RadControls for WPF build 2012.1.0528.40? If so, I'm not seeing any difference at all.

EDIT:

After further side-by-side testing, I'm seeing a marginal (5-10%) performance increase with expanding and about a 50% performance increase with collapsing. Scroll performance is still pretty awful.

-Greg
0
Vlad
Telerik team
answered on 04 Jun 2012, 02:59 PM
Hello,

 Have you checked the application I've attached in this thread? 

All the best,
Vlad
the Telerik team

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

0
Greg
Top achievements
Rank 1
answered on 04 Jun 2012, 03:01 PM
The Silverlight app? No, I haven't checked it out because ours is a WPF application. I was directed to this thread when I created a support ticket for this issue.

-Greg
0
Vlad
Telerik team
answered on 04 Jun 2012, 03:12 PM
Hi,

 I'm attaching the same application however for WPF. 

All the best,
Vlad
the Telerik team

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

0
Greg
Top achievements
Rank 1
answered on 04 Jun 2012, 03:43 PM
Ah-HA! Okay, I figured out what we were doing wrong. In retrospect, it's rather embarrasing, but for the sake of everyone else, I'll confess...

See, we had accidentally defeated the TreeListView's virtualization. How? Because we placed it in a container that was, in turn, placed inside a ScrollViewer. In doing so, we allowed the TreeListView to fully expand vertically rather than using it's own scroll bar and, in effect, that defeated the virtualization. By simply removing the outer scrollviewer and allowing the TreeListView to use its own the problem is 100% solved for us and the control performs great!

So, while we're facepalming here, hopefully the next person will avoid our mistake. I'll be closing our support ticket. :)

Thanks!
-Greg
Tags
TreeListView
Asked by
Minwei
Top achievements
Rank 1
Answers by
Minwei
Top achievements
Rank 1
Veselin Vasilev
Telerik team
Alexey
Top achievements
Rank 1
Vlad
Telerik team
Ivano
Top achievements
Rank 1
Konstantin
Top achievements
Rank 1
Tim
Top achievements
Rank 1
Hristo
Telerik team
Marcos Sampaio
Top achievements
Rank 1
Tony
Top achievements
Rank 1
Jatinder
Top achievements
Rank 1
AKROS
Top achievements
Rank 1
Harish
Top achievements
Rank 1
Greg
Top achievements
Rank 1
Share this question
or