0

How do you load 60 000 nodes into angular-ui-tree?

Even at 1000 nodes the page takes 30 seconds to draw while the page hangs, even if I set all nodes to collapsed=true in the HTML so they don't render immediately.

I'm guessing the only way to do this would be to have two separate data sources:

  • one with maybe 20 root nodes that I load in the treeview to start and
  • the other full 60k nodes.

Then when a user clicks on a node in the tree I manually copy the children of that node from the full set into the treeview set (like an in memory 'AJAX' call).

Anyone have any better ideas?

Richard
  • 14,798
  • 21
  • 70
  • 103
  • 1
    You want to page this indeed. Load only the root nodes and load childs when opening a node. Also try to load the tree in memory first and then append it to the page. – Mouser Mar 05 '15 at 13:02
  • 1
    Lazy-load anything below level 1 of your tree as the node is expanded. – Anders Bornholm Mar 05 '15 at 13:03

0 Answers0