IsVirtualizing related

3 posts, 1 answers
  1. Ruben Hakopian
    Ruben Hakopian avatar
    37 posts
    Member since:
    Nov 2009

    Posted 19 Jul 2010 Link to this post

    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. Answer
    Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 20 Jul 2010 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. rubenhak
    rubenhak avatar
    58 posts
    Member since:
    Dec 2008

    Posted 20 Jul 2010 Link to this post

    Hi Miroslav,

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

     

    Ruben

Back to Top