Performance issues on large dataset
Closed this issue · 5 comments
Is there a way to handle rendering a very large family tree? It seem to choke and the interaction is very very slow.
maybe there's a way to render portions of the tree and render the rest as they are expanded?
hmm, I am not sure how big the tree have to be. This one is pretty big, but it work ok, I think.. https://donatso.github.io/family-chart/examples/wiki-tree/?wiki_id=Q855
Can you give me some example of that very large tree?
sorry for the late reply. The example you showed seem to have less than 50 nodes (individual names). I'm looking to render a tree with almost 1000 nodes.
uh, 1000 is a lot. svg cannot handle so many cards.
best I can do for you for now is suggest this little hack that cuts tree before rendering it.
https://codesandbox.io/s/family-chart-static-forked-qwbrw1?file=/index.html
default is max_depth=1, which means that only parents and children and their spouses for the selected person will be shown.
then you have to select child or parent to see their relatives.
max_depth=2 will show grandparents and grandchildren and so on...
I hope it helps!
Haha yeah. This took is amazing but I'm pushing it with that many nodes.
That's perfect. Cutting the tree before rendering actually give a better experience. Thanks a million!!