How To: Speeding up adding nodes to a Treeview

Every time you add a node to a treeview, it slows down the program.  That is because after each node, the treeview repaints.  This can get expensive for a good deal of nodes.  Luckily the treeview has built in methods BeginUpdate and EndUpdate to solve the problem. Calling BeginUpdate before you add nodes and EndUpdate after you have finished greatly speeds up the addition of nodes to your treeview.