toolness/collusion — Issue #24: Physics simulation gets very slow with a lot of nodes
Author: jonoxia
Created: 2012-01-31 22:18:51+00:00
State: open
Labels: Performance

It works great for ~25 nodes, not so great with ~100 nodes.

Some ideas of things to try:

1. Profile and see if the slowdown is more in the physics simulation itself, or more in the rendering

2. See https://github.com/mbostock/d3/wiki/Force-Layout - there is a parameter "theta" that can be tweaked for a faster but less accurate physics simulation.

3. maybe don't try to redraw positions every tick, but instead only redraw once per X milliseconds (and CSS animate between these positions?)

4. maybe once the graph reaches a certain size, "pin" some of the nodes so that they no longer move, so we don't have to simulate forces on them or animate them; only the newer nodes joining the graph would be free to move relative to the pinned nodes.