I believed a better approach is to view the program as a tree of
function calls - so I started a small project we call pytracer.
pytracer lets you run a program similarly to cProfile (Currently, the
performance hit is worse than that of cProfile, but that can probably
be improved), while creating a profile.out result file.
Then, a Gtk+ based viewer can be used to view the profile.out,
exposing an expandable tree of function invocations - each with timing
information (real, user, system time).
You can find the project at: http://code.google.com/p/pythontracer
And the downloads at:
http://code.google.com/p/pythontracer/downloads/list
Project authors:
Eyal Lotem
Noam Lewis
Simon Yoffe