Unplanned
Last Updated: 29 Mar 2023 11:33 by ADMIN
Suresh
Created on: 29 Mar 2023 11:19
Category: TreeView
Type: Bug Report
0
RadTreeView: Improve filtering performance with 100000 nodes in bound mode

Use the following code snippet and compare the filtering performance when using bound and unbound mode:

         public RadForm1()
        {
            InitializeComponent(); 

            this.radTextBox1.TextChanged += this.RadTextBox1_TextChanged;
             this.radTextBox2.TextChanged += this.RadTextBox2_TextChanged;
            List<Data> list = new List<Data>();
            this.radTreeView1.BeginUpdate();
            for (int i = 0; i < 100000; i++)
            {
                list.Add(new Data()
                {
                    Id = i,
                    Name = "MyData_"+i,
                    ParentId = -1
                }) ;

                this.radTreeView1.Nodes.Add("MyData_"+i);
            }
            this.radTreeView1.EndUpdate();
            this.radTreeView2.DisplayMember = "Name";
            this.radTreeView2.ParentMember = "ParentId";
            this.radTreeView2.DataSource = list; 
        }

         private void RadTextBox2_TextChanged(object sender, EventArgs e)
         {
               this.radTreeView2.Filter = this.radTextBox2.Text;
         } 
        private void RadTextBox1_TextChanged(object sender, EventArgs e)
        {
            this.radTreeView1.Filter = this.radTextBox1.Text;
        }
    }

    public class Data
    {
        public int Id { get; set; }
        public string Name { get; set; } 
        public int ParentId { get; set; }
    }

Expected behavior: the performance in bound and unbound mode should be quite similar

Actual behavior: the performance is much slower in bound mode

1 comment
ADMIN
Dess | Tech Support Engineer, Principal
Posted on: 29 Mar 2023 11:33

Hi, Suresh,

Thank you for bringing this case to our attention. It requires a more detailed core profiling since it seems that the property value accessing and the number of treeview updates take most of the time filter filtering in bound mode:

We will do our best to improve the performance in bound mode while filtering accordingly. Make sure that you follow this item in order to get notified once any status changes occur.

Currently, due to the specificity of the issue and the huge number of records, the possible solution that I can suggest is to use unbound mode. Please excuse us for the inconvenience caused.

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.