>I have been using the treeview.nodes.clear() method and am having performance issues. A treeview with about 300 items loads less than half a second on all machines, but issuing the clear() call takes about 2.5 seconds on my development machine and up to 2 minutes on some of the client machines. I can't imagine how populating a treeview can be so much faster than clearing it.
>
>Is there a workaround or advice on how to improve the performance? The machines are somewhat similar in hardware and speed.
>
Troy,
I'm not sure what would cause this either, so anything I respond with is going to be pure speculation. You might try the loop as was suggested before, but that might be even slower. Alternately, you could do a RemoveObject()/AddObject() to completely destroy then re-create the treeview. Best, however, might be to to use two treeviews and toggle their Visible property. You could then load one while it's not visible, make the other one invisible, then display the newly loaded one, and then unload (using the Nodes.Clear method) the one that's no longer visible.
George
Ubi caritas et amor, deus ibi est