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

RadTreeListView poor performance

8 Answers 333 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 17 May 2013, 09:09 PM
Hi, 

Check out this simple scenario (zip project)
Its a RadTreeListView, bound up to an entity with a combobox to expand to each level. The performance is crap. 
I'm using the lightweight metro (windows8) style, and have overridden CreateCellElement as follows. 
public override FrameworkElement CreateCellElement(GridViewCell cell, object dataItem)
{
    if (cell.Content != null && cell.DataContext == dataItem)
    {
        return (FrameworkElement)cell.Content;
    }
 
    return base.CreateCellElement(cell, dataItem);
}

Open it up, drag to fill the height of your screen, expand all items a couple of levels deep (using the combo, top left) and scroll around - it's extremely laggy. Any suggestions? In my work version a similar scenario is entirely unusable, and I'm currently forced to loop through all expanded rows and dispatch 'ExpandHierarchyItems' calls which ties up the UI for ages, just to prevent a horrendous scrolling experience (extremely slow/massive UI lockups, nodes not expanded, no children, rows at wrong level). Latest version of telerik WPF, windows 7 x64.
 
I'm now comparing this simple scenario with the alternatives (devexpress etc) ... 


cross posted here: http://stackoverflow.com/questions/16623749/telerik-radtreelistview-poor-performance
duplicate of http://www.telerik.com/community/forums/wpf/gridview/radtreelistview-poor-performance.aspx (wrong channel)

8 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 22 May 2013, 04:21 PM
Hello,

 
Thank you for sending us a demo project. I tried to run it, but there are many missing references. Would you please attach the references you use, so that I can run the project?

Generally I can suggest you to go through the Tips and Tricks help article suggesting on how you could improve the performance. 

Regards,
Didie
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Andrew
Top achievements
Rank 1
answered on 22 May 2013, 04:43 PM
Just install the nuget extension Didie - nuget package restore is on 
Edit: I've updated the zip with dlls for anyone not using nuget 
Nothing in the tips & tricks helps ... feel free to check over the solution. 
0
Dimitrina
Telerik team
answered on 27 May 2013, 12:34 PM
Hello,

I have tested the scrolling. What I can suggest in this case would be to set ScrollMode="Deferred". That way the scrolling performance will be improved. 

Then I see that you set the IsExpanded state when the RowLoaded event is raised:

private void OnRowLoaded(object sender, RowLoadedEventArgs e)
{
    var row = e.Row as GridViewRow;
    if (row != null)
    {
        var person = (Person)row.DataContext;
        if (row.IsExpanded != person.IsExpanded)
        {
            row.SetValue(GridViewRow.IsExpandedProperty, person.IsExpanded);
        }
    }
}

The RadTreeListView supports UI Virtualization as explained in this help article. Since the virtualization is turned on by default, it is not recommended to work with the visual elements (i.e. Rows) and their properties. 

Generally we recommend controlling the expanded state through using the IsExpandedBinding property as demonstrated on the "IsExpanded binding" WPF Demo.

Please try those two suggestions and let me know how they work for you.

Regards,
Didie
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Lee
Top achievements
Rank 1
answered on 27 May 2013, 06:56 PM
Scrolling=Deferred is not an option for us I'm afraid, tried that one and it was rejected by the clients - they want to see their content whilst scrolling. You'll note OnRowLoaded isnt being invoked, that was just one of many experiments to try to solve this.  

0
Dimitrina
Telerik team
answered on 29 May 2013, 03:06 PM
Hello,

Indeed when there are a lot of visual elements (especially expanded in many hierarchy levels) scrolling performance will degrade significantly as all the rows should be created as they are brought into view.

You can try to remove some visual elements and use Implicit Styles - for example you could use reduce the number of visual objects of the TreeListVIewRow and GridViewCell.

Regards,
Didie
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Lee
Top achievements
Rank 1
answered on 29 May 2013, 04:49 PM
How much simpler can we get than the reference project, it's using your windows8 (metro) theme! 
This doesnt seem like it should be so much worse performing than scrolling a normal non-hierarchical grid, the same rows need to be created in both scenarios. 


0
Nick
Telerik team
answered on 31 May 2013, 12:09 PM
Hi Lee,

Unfortunately currently this is a limitation of the TreeList control. The problem is that the rows that are generated may have hierarchy that has to be loaded, measured and rendered as well. 

Currently we are working on creating more lightweight templates for our controls that will drastically boost the rendering performance resulting in better user experience. 

Nevertheless, until the mentioned templates are released, you can use the approach Didie has suggested in her previous reply.

We are sorry for any inconvenience caused! 

Regards,
Nik
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Thiago
Top achievements
Rank 1
Iron
answered on 06 Jul 2021, 10:46 PM
Hi.
I know this post is old, but has anything been done to improve it?
I am facing this problem yet.
Version 2020.2.513.45
Andrew
Top achievements
Rank 1
commented on 06 Jul 2021, 10:59 PM

Wow - I created this post, and - I didnt know anyone was still using WPF, let alone Telerik!
Thiago
Top achievements
Rank 1
Iron
commented on 06 Jul 2021, 11:50 PM

Kkkk very good! Yes we still use WPF and Telerik.
Martin Ivanov
Telerik team
commented on 08 Jul 2021, 09:49 AM

Indeed, WPF is still actively used.

As for the performance, there are many modifications created between the versions, but the general issue here is that the WPF framework is not performant in scenarios with big amounts of items rendered at once. I would recommend you to check the Tips and Tricks article and try the suggestions there. If those don't help I would suggest you to open a new support ticket along with your project showing the troublesome performance.

Tags
TreeListView
Asked by
Andrew
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Andrew
Top achievements
Rank 1
Lee
Top achievements
Rank 1
Nick
Telerik team
Thiago
Top achievements
Rank 1
Iron
Share this question
or