Closed felixbuenemann closed 10 years ago
Btw. I would probably remove the text overlay on the flamegraph rectangles completely, because they usually aren't really readable. I think the text shown below the flamegraph is sufficient. Doing so cuts the execution time for the rails-startup example to 3.5s. Unless your way zoomed in, this code does only burn cpu cycles.
I also discovered that replacing opacity
with fill-opacity
in mouseover
and mouseout
results in much faster drawing of the hover effect on the demo example.
I like this PR, nice, thanks!
I find the text overlay very useful when I am zoomed in, but really wish we also had a nice hover box that is next to it.
In my ideal world:
Using a tooltip seems like a good idea. I guess it would be possible to store it in an attribute on the svg node and display it on hover. That would be much faster and avoid the small fontsize.
Only call expensive getBBox method if needed. This reduces execution time for the rails-startup example from 1m20s to 6.5s (measured in Safari 7.01).