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

Poor performance when Tree lines are Visible

9 Answers 158 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Lorenz
Top achievements
Rank 1
Lorenz asked on 25 Feb 2015, 02:05 PM
Hi,

I have an application built using MVVM pattern and Caliburn, which displays two TreeListView in parallel using Virtualization.
When I set the IsExpandedBinding property, then performances (scrolling down ...) are really bad.
When Tree Lines are hidden, then performances are only acceptable.

I also have another need: the background color of each row should change based on a binding (Status property).
I tried to achieve this with a RowStyleSelector (not sure I should do it like this with lightweight templates) but performance are incredibly bad (Especially when dragging the Scrollbar or when using Page Up/Down keys)...

Note that the test application displays a sample data source but, but be aware that in real life, this data source can be really big. Right now, the TreeListView is simply not usable.

How I improve the performance? What do I do wrong ?

Please find attached by test solution.
You can turn on/off tree  lines and row styles with:
<Setter Property="RowStyleSelector" Value="{StaticResource DiffRowStyleSelector}" />
<Setter Property="TreeLinesVisibility" Value="Hidden" />

Thanks for your help

9 Answers, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 26 Feb 2015, 08:26 AM
Hello Benoit,

I am unable to run the project after resolving the references to Caliburn and Ninject. The exception is that the DataSource.xml file is missing. 
Would it be possible to send a runnable version of the project? This will greatly help in the process of finding a solution. 

On a side note, is the performance considerably better if you just disable the TreeLines?

Regards,
Nick
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Lorenz
Top achievements
Rank 1
answered on 10 Mar 2015, 08:25 AM
Hi Nick,

were you able to compile the test solution ?

Kind regards,
Benoît
0
Dimitrina
Telerik team
answered on 10 Mar 2015, 12:57 PM
Hi Benoît,

I am afraid we were not able to run the provided sample project. Did you have the chance to try the suggestion of my colleague - to disable the TreeLines?
Would it be possible for you to send us a solution which we can successfully start in a new support thread? You can also take a look at this blog post for a reference on how to isolate an issue. 

Regards,
Dimitrina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Lorenz
Top achievements
Rank 1
answered on 10 Mar 2015, 01:12 PM
Hi Dimitrina,

Yes, if I disable TreeLines then performance are OK.
When I enable TreeLines it becomes slower, and when I enable both TreeLines and RowStyle, then it becomes incredibly slow.

Please find attach a new version of my solution.

Kind regards,
Benoît
0
Dimitrina
Telerik team
answered on 11 Mar 2015, 09:54 AM
Hello Benoît,

Thank you. I am now able to successfully run the solution.

Using a RowStyleSelector additionally creates a performance hit. In case RowStyleSelector is used, we always assume that a different style is returned as there is not a way to predict the outcome of the SelectStyle invocations in order to cache them on scrolling. Generally, I would especially recommend you considering the Implicit Styles and Lightweight Templates for improving the loading performance results. The suggested articles are for RadGridView, however, the same approach also applies for RadTreeListView.

Let me know how they work for you.

Regards,
Dimitrina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Lorenz
Top achievements
Rank 1
answered on 18 Mar 2015, 08:55 AM
Hi Dimitrina,

Sorry, but I don't really nderstand what you mean.
We are already using Lightweight templates and implicit styles: we are using binaries from Binaries.NoXaml and we hae merged the needed styles in App.xaml

<ResourceDictionary.MergedDictionaries>
        <telerik:Office2013ResourceDictionary />
        <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/System.Windows.xaml" />
        <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.xaml" />
        <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Input.xaml" />
        <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Navigation.xaml" />
        <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.RibbonView.xaml" />
        <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.GridView.xaml" />
        <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Docking.xaml" />
    </ResourceDictionary.MergedDictionaries>
 
    <Style BasedOn="{StaticResource GridViewRowCoreStyle}" TargetType="telerik:GridViewRow" />
    <Style BasedOn="{StaticResource GridViewCellCoreStyle}" TargetType="telerik:GridViewCell" />
    <Style BasedOn="{StaticResource TreeListViewRowCoreStyle}" TargetType="telerik:TreeListViewRow" />
0
Dimitrina
Telerik team
answered on 23 Mar 2015, 08:44 AM
Hello Benoît,

I am sorry to hear the suggested approach do not help even though you have already implemented it. I have forwarded the specific case directly to the development team for a further investigation.

Regards,
Dimitrina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Nick
Telerik team
answered on 24 Mar 2015, 03:56 PM
Hi Benoît,

We investigated the case in deeper details. The overhead introduced by the combination of both TreeLines rendering and custom RowStyles is expected. 

The only other thing appart from the LightWeight templates to do in order to boost performance is to set the GroupRenderMode to Flat, and set AutomationManager.AutomationMode = AutomationMode.None in the App's constructor. 

Hope this helps.

Regards,
Nick
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Lorenz
Top achievements
Rank 1
answered on 30 Mar 2015, 10:36 AM
Thanks for you answer Nick!

But in the meantime, we have decided to move to the TreeView: we have better performance compared to TreeListView.

Concerning your second point, AutomationMode was already set to Disabled.

Regards,
Benoît
Tags
TreeListView
Asked by
Lorenz
Top achievements
Rank 1
Answers by
Nick
Telerik team
Lorenz
Top achievements
Rank 1
Dimitrina
Telerik team
Share this question
or