flamegraph icon indicating copy to clipboard operation
flamegraph copied to clipboard

Performance issues for large graphs

Open d12 opened this issue 6 years ago • 3 comments

Profiling an ActiveRecord query generates a flamegraph that is borderline unusable. Zooming in to the graph such that labels show slows down the page to 300ms per frame, 3FPS. The majority of time is spent in d3.js restyling and rendering.

Can zoom be implemented in a way that doesn't require expensive re-calculations whenever we want to move around the graph?

Screen Shot 2019-05-28 at 10 55 35 AM

Screen Shot 2019-05-28 at 10 55 51 AM

d12 avatar May 28 '19 14:05 d12

I would love some improvements made here, for sure, care to give it a shot. also @thisduck is planning to merge in his implementation as an optional rendering engine which works way better with very large graphs.

SamSaffron avatar May 29 '19 08:05 SamSaffron

I'm not super well versed in d3, I'm not sure I could do much better than this 😅 . Any reason for d3 over plain HTML/CSS?

d12 avatar May 29 '19 13:05 d12

Some related work: https://github.com/tmm1/stackprof/pull/74 https://github.com/tmm1/stackprof/pull/100

aroben avatar May 29 '19 14:05 aroben