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

IsVirtualizing related

2 Answers 155 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Ruben Hakopian
Top achievements
Rank 1
Ruben Hakopian asked on 19 Jul 2010, 06:58 PM
Hi,

I recently found out that you guys support virtualization on the RadTreeView and am very happy with its performance.
The way I use it is:

telerikTreeView:TreeViewPanel.IsVirtualizing="True"
telerikTreeView:TreeViewPanel.VirtualizationMode="Recycling"

There are three modes for virtualization - "Recycling", "Standard" and "Hierarchical". I could find some description for first two. How does the "Hierarchical" perform?

Also I noticed that virtualization is not enabled by default. Are there any cases when virtualization should not be turned on? Do I need to worry about something when turning it on?

Thank you,
Ruben.

2 Answers, 1 is accepted

Sort by
0
Accepted
Miroslav
Telerik team
answered on 20 Jul 2010, 03:39 PM
Hello Ruben,

There is no particular reason to have the virtualization off by default. We find that some developers prefer to work directly with the control objects and have them around - in a more "WinForms" style.

With virtualization turned on you should not keep a reference to the control items since their data objects can change quickly, for example

var a = tree.GetItemBypath("path");
a.PreviousItem.Expand();
// In the next layout pass 'a' may be pushed out of view and recycled as a container for another item.

I will note the lack of documentation about this, it should be included with a coming update.

In short:

None (default)
IsVirtualizing = “false”

All items within an expanded level are created, no virtualization. Performance may not be as bad if there is deep hierarchy and all items are initially collapsed. ~200 expanded items may run smooth.

Standard
IsVirtualizing = “true”
telerikTreeView:TreeViewPanel.VirtualizationMode="Standard"

Items that are out of view and are not expanded will be virtualized.
No container caching or reuse is done.
This mode is suited for long lists with little jagging and little scrolling / searching.
It consumes less memory at expense of CPU.
Expanding and scrolling though a heavily indented hierarchy will mean little items will be virtualized since most of them will be expanded.

Recycling
IsVirtualizing = “true”
telerikTreeView:TreeViewPanel.VirtualizationMode="Recycling"

Items that are out of view and are not expanded will be virtualized.
Containers are cached and reused at ItemsControl level.
The container cache is cleared after 3 seconds of inactivity.
This mode is suited for long lists with little jagging.
Scrolling longer lists is very fast.
It consumes more memory at expense of CPU.
Expanding and scrolling though a heavily indented hierarchy will mean little items will be virtualized since most of them will be expanded.

Hierarchical
IsVirtualizing = “true”
telerikTreeView:TreeViewPanel.VirtualizationMode="Hierarchical"

Items that are out of view will be virtualized.
Expanded items are virtualized.
Containers are cached and reused at TreeView level (hence “Hierarchical”).
This mode is suited for jagged hierarchies and fully expanded trees.
Scrolling may be slower in longer lists (collapsed trees) but faster when the tree is expanded.
Expanding and scrolling though a long heavily indented hierarchy should perform ok.



Hopefully this will help you get started,

Best wishes,
Miroslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
rubenhak
Top achievements
Rank 1
answered on 20 Jul 2010, 06:09 PM

Hi Miroslav,

I think I got the main idea.
Thank you very much!

 

Ruben

Tags
TreeView
Asked by
Ruben Hakopian
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
rubenhak
Top achievements
Rank 1
Share this question
or