Look at more profiling tools
run_profile.py supports various profiler visualizations, but sometimes those are hard to interpret still. There seem to be other projects worth looking at (most of them don't use cProfile):
- https://github.com/uber/pyflame
- https://github.com/bdarnell/plop
- https://github.com/nvdv/vprof
- https://github.com/pyutils/line_profiler
- https://github.com/benfred/py-spy
- https://github.com/plasma-umass/scalene
- https://github.com/P403n1x87/austin
- https://github.com/sumerc/yappi
Line_profiler is very easy to do manually, and dosen't seem to support other profile visualization tools at a first glance, so maybe we could just add a comment telling people to use something like:
kernprof -vl qutebrowser.py --temp-basedir after adding @profile annotations to functions.
FWIW profiling of native extensions is now fully implemented in py-spy v0.2.0 for x86_64 Linux/Windows. Last time I tested it it already worked pretty well, so that seems like a quite useful tool to me.