jiffyclub / snakeviz

An in-browser Python profile viewer
https://jiffyclub.github.io/snakeviz/
Other
2.35k stars 138 forks source link

Visualiza a profiling output in notebook directly? #140

Open dclong opened 4 years ago

dclong commented 4 years ago

SnakeViz support line and cell magics (%snakeviz, %%snakeviz) to visualize profiling of code in notebooks directly. Suppose I have a profiling output alreeady (very time-consuming to regenerate), can I use SnakeViz to visualize it in notebook directly (instead of visualizing it in browser)?

jiffyclub commented 4 years ago

Hi @dclong, that's a great question and feature idea, but not something snakeviz currently has built in. There's probably a workaround here where you use this svstatic tool to create a static HTML file of the profile and then add that to the notebook using IPython's display.HTML, or maybe an iframe loading a saved HTML file.

This is definitely something that'd be great to add to snakeviz, though.