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

[Solved] Performance issue

1 Answer 136 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Roman Royter
Top achievements
Rank 1
Roman Royter asked on 27 Jun 2008, 05:01 PM
I've found two bottlenecks in RadTreeView control.
The first one is in RadTreeViewRenderer.GetContextMenusHtml() where you use string concatenation instead of StringBuilder. By switching to StringBuilder I got about 5 seconds off, when generating html for 1500 elements.

The second bottleneck is in RadTreeViewXmlParser.GetNodeXml() where you place the TypeDescriptor.GetProperties(node) call inside foreach loop. Another thing is you call prop.GetValue(node) 3 times per iteration which greatly degrades performance. By moving TypeDescriptor.GetProperties(node) outside the loop and storing prop.GetValue(node) into temp variable I was able to save another 5-6 seconds of page render.


1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 30 Jun 2008, 07:49 AM
Hello Roman Royter,

You can try RadTreeView for ASP.NET Ajax which should perform better. We use the built-in XML serialization for GetXml/LoadXml.

Greetings,
Albert
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
TreeView
Asked by
Roman Royter
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or