.Net TreeView EndUpdate is very slow

We have an outdated application written in C ++ / CLI (WinForm), and it displays a complex tree view with almost 10K elements. Adding / removing / renaming tree nodes is wrapped in BeginUpdate / EndUpdate methods. The problem is the EndUpdate () method, which takes almost 180 seconds to complete. This takes the same time, even when only 100 nodes are available and the others are reset. Since the EndUpdate () method takes the same time, I think TreeView draws the nodes even if they are not visible. Is there a way to prevent treenode coloring that is not visible? Please suggest ways to improve this painting speed? Note. The DoubleBuffered treeview property is true.

+4
source share

All Articles