I have a RadTreeView that can get up to 4 levels deep. The problem I am having is that adding and removing nodes is extremely slow. Unfortunately my current position doesnt allow me to write a batch function to insert/remove nodes in groups. I tried using the BegingUpdate() and EndUpdate() and this helped, and by helped i mean it took my CPU utilization from 100% to 50%. Any suggestions on how to improve this?
5 Answers, 1 is accepted
0
Hello Eric,
In order to reproduce your case, I used the Loading Nodes example where the tree loads 50 000 nodes.
It took just under a second to add new node to the tree after loading the 50 000 nodes.
At the moment the more nodes you load in a RadTreeView the slower adding/removing nodes is.
That is because the layout algorithm iterates over all the nodes in order for the new node to be displayed correctly.
In a batch update operation the layout algorithm updates the layout of nodes only once at the end of the operation.
That is why if you want to be able to add/remove many nodes and not sacrifice performance you have to use BeginUpdate and EndUpdate methods of RadTreeView as in the Loading Nodes example. Otherwise, as I see your case, you will most probably have performance issues if there are lots of nodes in your RadTreeView.
Best wishes,
Jordan
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
In order to reproduce your case, I used the Loading Nodes example where the tree loads 50 000 nodes.
It took just under a second to add new node to the tree after loading the 50 000 nodes.
At the moment the more nodes you load in a RadTreeView the slower adding/removing nodes is.
That is because the layout algorithm iterates over all the nodes in order for the new node to be displayed correctly.
In a batch update operation the layout algorithm updates the layout of nodes only once at the end of the operation.
That is why if you want to be able to add/remove many nodes and not sacrifice performance you have to use BeginUpdate and EndUpdate methods of RadTreeView as in the Loading Nodes example. Otherwise, as I see your case, you will most probably have performance issues if there are lots of nodes in your RadTreeView.
Best wishes,
Jordan
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Hi Eric,
Could you let us know whether our suggestion helped? Are you going to need further assistance on the matter?
Thanks in advance.
Sincerely yours,
Vassil
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Could you let us know whether our suggestion helped? Are you going to need further assistance on the matter?
Thanks in advance.
Sincerely yours,
Vassil
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0

Leland
Top achievements
Rank 1
answered on 17 Feb 2010, 05:59 PM
I use the following code to load a treeview
Generating the list using the call to SelectUnassignedDomains takes 18 seconds but in processing the data source for the treeview it takes upwords of 2 minutes. Is there something other than the BeginUpdate, EndUpdate that can be implemented to increase the performance?
With treeUnassigned
.BeginUpdate()
.DisplayMember =
"DomainName"
.DataSource =
New SelectDomains(_mintuserid).SelectUnassignedDomains
.EndUpdate()
End With
Generating the list using the call to SelectUnassignedDomains takes 18 seconds but in processing the data source for the treeview it takes upwords of 2 minutes. Is there something other than the BeginUpdate, EndUpdate that can be implemented to increase the performance?
I have also replaced the .DataSource with a foreach loop just populating using the nodes.add with a new node that only contains the node's display name, and it also takes a very long time to load.
0
Hello Leland,
Thank you for writing. Please specify how large is your data source, if it has, say 2 000 000 items, there will certainly be a noticeable delay. In our Examples application there is an example which shows RadTreeView load time for 50 000 nodes. If you are absolutely certain that the performance issue is on our side, please provide the code which causes the slow load so that I may be able to assist you further. I am looking forward to your reply.
Kind regards,
Victor
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.
Thank you for writing. Please specify how large is your data source, if it has, say 2 000 000 items, there will certainly be a noticeable delay. In our Examples application there is an example which shows RadTreeView load time for 50 000 nodes. If you are absolutely certain that the performance issue is on our side, please provide the code which causes the slow load so that I may be able to assist you further. I am looking forward to your reply.
Kind regards,
Victor
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
Hi Eric,
Best wishes,
Stefan
the Telerik team
Please note that in Q1 2011 we have introduced a major upgrade of RadTreeView control, which is now virtualized and fully customizable. Feel free to download the latest release and try it out. For more information on our latest release refer to this blog post.
Best wishes,
Stefan
the Telerik team