Poor performance when Tree lines are Visible

11 posts, 0 answers
  1. Benoit
    Benoit avatar
    17 posts
    Member since:
    Oct 2014

    Posted 25 Feb 2015 Link to this post

    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

  2. Nick
    Admin
    Nick avatar
    593 posts

    Posted 26 Feb 2015 Link to this post

    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.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Benoit
    Benoit avatar
    17 posts
    Member since:
    Oct 2014

    Posted 26 Feb 2015 in reply to Nick Link to this post

    Hi Nick,

    Sorry for my mistake.
    Normally the project should work if you change the "Build Action" of the DataSource.xml from "Resource" to "None".

    Let me know if it works.

    Kind regards,
    Benoît
  5. Benoit
    Benoit avatar
    17 posts
    Member since:
    Oct 2014

    Posted 10 Mar 2015 Link to this post

    Hi Nick,

    were you able to compile the test solution ?

    Kind regards,
    Benoît
  6. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 10 Mar 2015 Link to this post

    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.

     
  7. Benoit
    Benoit avatar
    17 posts
    Member since:
    Oct 2014

    Posted 10 Mar 2015 Link to this post

    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
  8. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 11 Mar 2015 Link to this post

    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.

     
  9. Benoit
    Benoit avatar
    17 posts
    Member since:
    Oct 2014

    Posted 18 Mar 2015 in reply to Dimitrina Link to this post

    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" />
  10. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 23 Mar 2015 Link to this post

    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.

     
  11. Nick
    Admin
    Nick avatar
    593 posts

    Posted 24 Mar 2015 Link to this post

    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.

     
  12. Benoit
    Benoit avatar
    17 posts
    Member since:
    Oct 2014

    Posted 30 Mar 2015 in reply to Nick Link to this post

    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
Back to Top
UI for WPF is Visual Studio 2017 Ready