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

Performance, virtualition isseUs

3 Answers 292 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Aleksandar
Top achievements
Rank 1
Aleksandar asked on 28 Jun 2016, 05:49 PM

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!

3 Answers, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 01 Jul 2016, 12:02 PM
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.
0
Aleksandar
Top achievements
Rank 1
answered on 02 Jul 2016, 08:08 PM

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...

0
Dinko | Tech Support Engineer
Telerik team
answered on 06 Jul 2016, 09:50 AM
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.
Tags
TreeView
Asked by
Aleksandar
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Aleksandar
Top achievements
Rank 1
Share this question
or