Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for "fluid" drawing #136

Merged
merged 5 commits into from
Jul 11, 2019

Conversation

jasonrhansen
Copy link
Collaborator

Closes #135

@codecov
Copy link

codecov bot commented Jul 10, 2019

Codecov Report

Merging #136 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #136   +/-   ##
=======================================
  Coverage   89.82%   89.82%           
=======================================
  Files          10       10           
  Lines        1150     1150           
=======================================
  Hits         1033     1033           
  Misses        117      117

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9d7657a...203bc01. Read the comment docs.

@jasonrhansen
Copy link
Collaborator Author

It seems to work well in Firefox and Chrome, but I tested in Safari and Edge, and they both had weird behaviors that I need to look into.

@jasonrhansen
Copy link
Collaborator Author

OK, I've got it working well in Safari and Edge now.

@jasonrhansen jasonrhansen merged commit b9479dc into jonhoo:master Jul 11, 2019
@jasonrhansen jasonrhansen deleted the fluid-drawing branch July 11, 2019 15:03
asherkin added a commit to asherkin/inferno that referenced this pull request Dec 28, 2020
See also jonhoo#153. PR jonhoo#136 changed the semantics of the `--minwidth` option
from output pixel width to percentage width (which is effectively the
same as pct of total samples), which greatly reduced the default
fidelity of flamegraphs as 0.1% of total time is quite coarse,
especially once you start zooming in.

This PR reduces the default to 0.01%, which produces pretty much
identical output as flamegraph.pl / old inferno at ~1200px wide and
includes a much greater number of bars. I think this change is worth
making as it makes it reduces friction for people migrating from
flamegraph.pl, and in my tests produces much more useful output by
default.

I've also updated the description of the option to match the current
behaviour, as it still mentioned pixels and that had me confused for
a good while.
@bobrik
Copy link

bobrik commented Jul 19, 2023

While it's a great change, this is really expensive to render for complex flamegraphs.

Compare initial load and render times:

  • Fixed width flamegraph:

image

image
  • Fluid width flamegraph:

image

image

Zoom is also a bit slower:

  • Fixed width flamegraph:
image image
  • Fluid width flamegraph:
image image

With 40-60% of the time spent in update_text I'm wondering if it makes sense given --truncate-text-right.

@bobrik
Copy link

bobrik commented Jul 19, 2023

#262 does the trick with a monospace font.

@jonhoo
Copy link
Owner

jonhoo commented Aug 13, 2023

@bobrik Yeah, there's definitely a cost involved with having the browser do this work. I think there's a decent argument for us just making monospace fonts the default — what do you think?

@bobrik
Copy link

bobrik commented Aug 13, 2023

That sounds reasonable to me. We should probably allow passing multiple font families at the same time too, so that users can have a preference list rather than one choice that might not be available on every platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for "fluid" drawing
3 participants