Home Forums WinForms controls Other WinForms controls Performance of the Treeview-Control … Reply To: Performance of the Treeview-Control …

User (Old forums)
Member
Post count: 23064

I also find the same result. The adding smartItem action is NOT linear!!!!

Add 10 Nodes : 234ms
Add 20 Nodes : 469 ms
Add 50 Nodes : 1500 ms
Add 100 Nodes: 4700 ms
Add 150 Nodes: 9550 ms
Add 200 Nodes: 16000 ms

Can anybody from XCeed answer this?

Here is the code:

int start = Environment.TickCount;
System.Diagnostics.Debug.Write(“Start building…”);
this.smartTreeView.SuspendLayout();
for (int i=0; i<150; i++)
{
Node node = new Node(“DynamicNode” + i.ToString());
this.smartTreeView.Items[0].Items.Add(node);
}
this.smartTreeView.ResumeLayout();
System.Diagnostics.Debug.Write(((int)(Environment.TickCount – start)).ToString() + “\n”);

Imported from legacy forums. Posted by jackjiaus (had 382 views)