javascript - Opening 500+ nodes at once in d3.js -


currently trying expand d3.js tree contains on 100,000 nodes. many leafs exist under multiple parents, fit multiple sections/items/regions. searches performed user results in tree opening leafs node id. can result in graph trying open up, on rare occasions, 2000 leaf nodes @ once. currently, have found way without crashing chrome use following setinterval code.

var timeout = setinterval(function(){     for(var j = i; j < + 10 ; j++){         makeel(d[j]);         search.rules += (j+1) + ") " + graph.findnode(d[j]) + "<br><br>";         highlightpathto(d[j].id);         if(j >= d.length - 1){             //when of elements have been itterated through.             clearinterval(timeout);             highlight.selected = d;              $('#highlights').removeclass('empty');              break;         }     }     i+=10; }, 500); 

however, takes minutes , laggy. there other way accomplish opening number of nodes in 1 go result in quicker completion?

not likely. javascript , browsers can't magically transcend limits of physics (or computer). browsers have come long way handling huge documents. there limits. don't know sure how memory each tree node needs if each of them needs 1 kb, we're talking 100 mb raw data needs rendered on screen. if each nodes takes 10 ms render, drawing page take 1000 seconds.

so guess without looking more closely @ problem can't it. , shouldn't: human brain isn't able process information nor there computer screen display all. think harder want achieve , find better representation.

you can dump ton of data on poor user drown them. find way present important bits, few gems under ton of garbage.


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -