jqTree icon indicating copy to clipboard operation
jqTree copied to clipboard

Issue while trying to load a little bit large amount of nodes

Open MoEhab110 opened this issue 3 years ago • 1 comments

image this is the structure i'm trying to render using jqtree and it was rendered successfully but took long time to load and frozen the browser page while rendering. PS: the last level is the only level contains large amount of nodes and the total nodes returned are 20800 any help with this?

MoEhab110 avatar Jul 21 '22 08:07 MoEhab110

Loading and displaying that many nodes is always going to be an issue for the browser. A possible solution is to load nodes on demand (lazy loading).

The idea is that you initially load only the first level of the tree. The other levels are loaded on demand: if a node is opened, then its children are loaded.

  • Example with instructions: https://mbraak.github.io/jqTree/examples/05_load_on_demand/
  • You need to change the server code for this.
    • Example: the url /example_tree/?node=23 should return the subtree for node 23.

mbraak avatar Jul 21 '22 11:07 mbraak