user2300875
user2300875

Reputation: 529

D3 force layout graph causes slowness in firefox browser

I have a dynamic force graph which runs every 3 mins (using setInterval I am calling update, start in the below order)

when I leave the browser open for sometime, browser slows down and the nodes move slowly when I drag them. Am I missing some thing here..

Help appreciated. Thanks.

Upvotes: 2

Views: 1076

Answers (1)

Drakonen
Drakonen

Reputation: 28

SVG performance in Firefox is slower than in Webkit/Chrome and IE10.

Still performance in Firefox is not bad. There are a few things you can try.

  • Be sure you are not leaving unused/empty elements around (like <g>s), and have everything properly cleaned up. Too many elements will kill your performance quickly.
  • Reduce the amount of nodes that use opacity, try to use it as little as possible.
  • Reduce the amount of elements.

One thing I also did, but not sure if it is any help, was to call force.stop() before calling force.start() again.

Upvotes: 1

Related Questions