by pachydermic · 11y ago · 0 comments
A static graph with a sane layout is what I'm after - anyone know of an efficient way to calculate the x and y positions ahead of rendering?
Thanks Obi Wan, you're my only hope.
Another key is to update positions of nodes and links only at calculation end, rather than at each tick. This means that user may have to wait a couple seconds before seeing the graph, but will save your browser from having to update the DOM at each tick (which could be thousands of times across thousands of elements).
But the best is still if you don't need to re-calculate the positions (no new nodes ever show up, and no nodes are ever deleted), going with what me_bx said.