SamSaffron / flamegraph

Flamegraph profiling support for Ruby 2.0
MIT License
382 stars 36 forks source link

Performance issues for large graphs #30

Open d12 opened 5 years ago

d12 commented 5 years ago

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

SamSaffron commented 5 years ago

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.

d12 commented 5 years ago

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?

aroben commented 5 years ago

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