Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All,
I am using tree view to display some data using angularJS. If my record count is less say some 100 to 200 records. It is working fine. if it is morethan that(my record actual count is 38,000), my code is not workinga nd my page is stuck and hanging in there. Can you please help with any simple suggesttion on how to make it better?

What I have tried:

Tried Server side becuase of too many conditions, it is taking lot of time to run the loop and bind to the tree view.
I am getting data from database like below. so a will be my parent, b,c,d are childs to 'a'.
~a
~a~b
~a~b~c
~a~b~c~d
Posted
Updated 6-Mar-17 5:09am

1 solution

TreeViews uses a Hierarchial data structure. This gives you an opportunity to make it work very quickly.

The trick is to load sub-elements on demand (aka: lazy-loading). In other words, only load the expanded level. The performance will feel instant. :)

[edit:] Just had a look at google search and there are some links with some great solutions: angularjs treeview load on demand[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900