angular-bootstrap-nav-tree icon indicating copy to clipboard operation
angular-bootstrap-nav-tree copied to clipboard

Slow with over 2000 branches

Open Graham42 opened this issue 10 years ago • 3 comments

Performance is really poor when dealing with a large tree.

Graham42 avatar Nov 20 '14 03:11 Graham42

This is probably due to an AngularJS limitation - 2000 watchers (through ngRepeat implementation) suffers in performance.

jangu avatar Dec 22 '14 04:12 jangu

I didn't test with 2000 nodes, but I experienced the same slowdown in my usecase. A workaround might be not to use deep watching for the whole tree data (which means multiple copies for each digest cycle). Instead, using JSON.stringify(treeData) works for us. See https://github.com/smee/angular-bootstrap-nav-tree/commit/8866da0edc1872e8a7e1acd410356f1d1952973e

smee avatar Jul 24 '15 12:07 smee

I have 8,000 nodes in my tree, it takes about 15 seconds to load, and any operation after that (expanding, collapsing or even simply selecting a node) will freeze the page for 15 seconds each.

Might be time for me to finally learn React. :stuck_out_tongue:

codeandcats avatar Apr 24 '16 04:04 codeandcats