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
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
What's your treelist version?
Best wishes,Vlad
the Telerik team
Still slow in version 2011.1.0419.1040.
Any news?
Sincerely
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
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!
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!
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?
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.
Vlad
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
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),
})
});
<
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).
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 >>
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.
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 >>
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 >>
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.
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.
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
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.
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.
Vlad
the Telerik team
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.
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.
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
We all really need this !!!!
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 >>
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
that's really good news! A big thanks to the telerik team! Just like AKROS said: Keep going like this !!
All the best,Tim.
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
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 >>
-Greg
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 >>
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