py-spy
py-spy copied to clipboard
svg width defaults to 300px instead of 100%
I run like this: sudo py-spy record -o /tmp/flame.html --pid 123
and the resulting flame.html contains this
<svg version="1.1" width="1200" height="634" onload="init(evt)" viewBox="0 0 1200 634" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:fg="http://github.com/jonhoo/inferno">
In chrome 95.0.4621.4 (or firefox 91.0.2), this svg element draws at 300px wide.

As a workaround, I inspect it and add 'width:100%' to the svg element, then bump my window width slightly to trigger a redraw. That makes the flame graph full-width.

We're using the inferno project to write out these SVG files - I think to fix this issue you'll have to raise an issue there.
However, I don't see this behaviour myself - it renders at full width with for me on firefox v92.0.1 on osx:

What version of py-spy are you running? Also what OS is this on?
This is in chrome on linux, but firefox (92.0, linux) behaves the same, as does chrome incognito.
py-spy 0.3.10