r6-operator-counters icon indicating copy to clipboard operation
r6-operator-counters copied to clipboard

Graph Optimization

Open bloodywine opened this issue 6 years ago • 2 comments

As the title states, optimize the graph to decrease load times and improve performance.

A post has been made here and awaiting responses: https://groups.google.com/forum/#!topic/d3-js/gzPTH6MgR_Q

I am working on rearranging the "relationships" section of the JSON in order to see if this has any improvement on frame rates and performance.

bloodywine avatar Jan 01 '19 19:01 bloodywine

I've not done a huge amount of research into this option, but moving from an SVG graph to using canvas may offer a boost (https://medium.freecodecamp.org/d3-and-canvas-in-3-steps-8505c8b27444)

There is limit to performance with D3 and SVGs. However, this graph doesn't have that many nodes. The operator SVGs on their own without relationships are smooth. The straight and curved relationships are also .svgs and the more of those, the more performance seems to degrade.

Potentially doing something inefficient with those? This is what I think so far.

BurkusCat avatar Jan 03 '19 22:01 BurkusCat

I think canvas might offer a good boost in performance as well. I have not done much research on this either, but what I know if that it only slows down when the graph is trying to adjust the SVGs around on first load.

This makes me think if we were to optimize the relationships JSON, the SVGs wouldn't move around and collide as much. Ergo, reducing frame drops. But again, its all theory at this point. I'll start with the canvas in my local environment and see if it offers any kind of reasonable boost in performance.

bloodywine avatar Jan 04 '19 03:01 bloodywine