Performance, virtualition isseUs

4 posts, 0 answers
  1. Aleksandar
    Aleksandar avatar
    5 posts
    Member since:
    Aug 2008

    Posted 28 Jun Link to this post

    Hi,

    I have a source with ~270 items which I want to display in treeview and rendering of this list takes 1-2min. This is very slow, and I believe that using a virtualization should take care of that but it seems not. Also, I see same performance either with  IsVirtualizing="True" or "False". As you can see, I also put additional properties, but without success. Another observation is that once items are displayed, there is additional time before UI unfreeze.

    This is xaml for treeview.

    <telerik:RadTreeView x:Name="treeView"
    ItemsSource="{Binding HierarchyFolderList}"
    ItemTemplateSelector="{StaticResource FolderTemplateSelector}" 
    AllowDrop="True" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
    Margin="5"
    IsDropPreviewLineEnabled="False"
    IsVirtualizing="True"
    telerik:TreeViewPanel.IsVirtualizing="True"                                  telerik:TreeViewPanel.TreeVirtualizationMode="Hierarchical"  telerik:AnimationManager.IsAnimationEnabled="False"                             telerik:TreeViewPanel.VirtualizationMode="Hierarchical">
    </telerik:RadTreeView>

    Thanks!

  2. Dinko
    Admin
    Dinko avatar
    201 posts

    Posted 01 Jul Link to this post

    Hi Aleksandar,

    Thank you for your interest in RadTreeView control.

    We were able to reproduce the describe behavior in your post. We have created a sample project attached to this reply so you can see that the Virtualization is working as expected. You can modified this project and send it back to us so we can further test it on our side. 

    In addition you can take a look at the UI Virtualization help article in our documentation.

    We are looking forward to your reply.

    Regards,
    Dinko
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Aleksandar
    Aleksandar avatar
    5 posts
    Member since:
    Aug 2008

    Posted 02 Jul in reply to Dinko Link to this post

    Hi Dinko,

    thanks for quick response.

    Here are the results of applying TreeViewPanel.TreeVirtualizationMode="Hierarchical":

    - Showing items during Expanding/collapsing node is very fast (which wasn/t the case)

    - Still have performance issues, it seems that virtualization isn't applied since scrolling is pixel-by-pixel

    I didn/t mention that items are shown in ListBox (ScrollViewer.CanContentScroll is set to true).

    This is setter for ItemsPanel of ListBox.

    <Setter Property="ItemsPanel">
                        <Setter.Value>
                            <ItemsPanelTemplate >
                                <VirtualizingStackPanel  />
                            </ItemsPanelTemplate>
                        </Setter.Value>
                    </Setter>

    My thought is that maybe ListBox prevents virtualization here...

  5. Dinko
    Admin
    Dinko avatar
    201 posts

    Posted 06 Jul Link to this post

    Hi Aleksandar,

    Let me first start with that in my previous reply I mean to say that I wasn't  able to reproduce the described behavior in your first post.

    I am not sure that I have correctly understood your approach .  In your last reply, you mentioned that you are using ListBox. If you specify every ListBox in a RadTreeViewItem you can try to remove the ListBox and check if the virtualization of the RadTreeView is working. If this is not the case you can give me more information which could help me to better understand your approach.

    From your last reply is not very clear which controls you are using to display the items (ListBox or RadTreeView). You can send me a code snippet from your project.

    I am looking forward to your answer.

    Regards,
    Dinko
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top