Function call performance timer

mike wakerly mike-list at wakerly.com
Sun Aug 19 03:10:09 CEST 2001


Hey All,

I've written a driver for a serial port LCD in Python. Trouble is, 
somewhere along the way, I introduced something (either in the driver or 
the front-end) that degrades performance significantly. (I can tell 
because display updates are latent.)

So, can anyone point me to some module that will let me run my program, 
and then just print perhaps, a tree of function call execution time? I'd 
like to know which function (I'm calling quite a few with recursion) is 
causing this bottleneck.

Best solution I can think of is extending pdb somehow, but I'm thinking 
surely someone has been curious about this before, probably a solution 
out there...?

Cheers,
Mike

PS: with regards to my previous query regarding threads not responding 
to events, the problem was my own error... a stray fork(), causing the 
forked process to not respond to the parent's modifications to events. 
oops!




More information about the Python-list mailing list