Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Large tree members handling #169

Closed
charbel14 opened this issue Mar 24, 2014 · 8 comments
Closed

Large tree members handling #169

charbel14 opened this issue Mar 24, 2014 · 8 comments
Milestone

Comments

@charbel14
Copy link

Hi,

I have a requirement to handle very large tree members. We are talking 100,000+ and could be a million.

This is at 1 level. i.e. one node with that many children.

How would this work in fancytree?

I was thinking that we need a couple of pieces of information the total number of children and how many to retrieve in one go (say 50).

The tree would then render only the 50 and no more than that... and as you scroll down more data is fetched from the server representing the page you are looking at. Page being (total number / 50)....

The search, sort, add, delete, update will need to be handled server side.

Any thoughts?

Thanks a lot.

@mar10
Copy link
Owner

mar10 commented Mar 25, 2014

Fancytree is not yet made for flat lists of that size. Maybe you want to have a look at some of the existing grid plugins.
We could start a paging extension, but as you pointed out, that may include supporting special cases sorting, filtering, ext-table, ext-comlumnview, ext-dnd, ....
So it is not on my top priority list.
But you might try to implement the core functionality using the standard events, e.g. only load 50 nodes in lazyLoad, and append a special node like "more..." that will trigger another appending request.

See also #54

@mar10 mar10 closed this as completed Mar 25, 2014
@charbel14
Copy link
Author

It will be nice to start a paging plugin.
Sorting and search will need to be delegated to server side.
Column and table plugins will need to be supported and hopefully will get that for free..

See this demo of a grid: http://www.jeasyui.com/tutorial/datagrid/datagrid27_demo.html

There is no reason why a tree can not have the same functionality. As you scroll up and down you can rebuild or even update the visible nodes.

@charbel14
Copy link
Author

Maybe as a first cut:

A node level maxsize can be set for example: maxLevelSize = 50, that means no more than 50 nodes will be drawn per level... as you scroll up or down nodes are destroyed or created as necessary... It is almost like the tree is giving you a small window into your json data.

The search can potentially search your json data... and render the nodes as required and also the sort.

Your thoughts?

@mar10
Copy link
Owner

mar10 commented Apr 2, 2014

Yes, why not.

You could fork this repository, create a new branch (e.g. 'paging') and start a new extension.

See here for some details:
https://github.com/mar10/fancytree/wiki/TutorialExtensions
http://wwwendt.de/tech/fancytree/doc/annotated-src/jquery.fancytree.childcounter.html

@mar10 mar10 added this to the 2.0.0beta milestone May 11, 2014
@mar10
Copy link
Owner

mar10 commented Oct 3, 2015

Added a specification document

@bharatpatil
Copy link

Need to see if we can use https://clusterize.js.org/ to implement this.
http://cheton.github.io/infinite-tree/ is using clusterize to render tree.

@bharatpatil
Copy link

@mar10 - I've put together a jsbin you can find it over here which contains fancytree (table extension) integrated with clusterize.js, however collapse and expand is not working. I am going to work more on this.

clusterize.js can be given an array of table rows as an input to render.
Let me know if you can help me with this.

https://jsbin.com/ravona/edit?html,js,output

@xgqfrms
Copy link

xgqfrms commented May 23, 2019

big JSON render bug

https://cdn.xgqfrms.xyz/json/deploy/big.json

image

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants