1. Richard Tew

    Richard Tew on 03/31/2009 6:31 a.m. #

    Does it work with Stackless? ;-)

  2. Mike Fletcher

    Mike Fletcher on 03/31/2009 8:55 a.m. #

    Well, the viewer, RunSnakeRun, works with whatever you dump from cProfile... does cProfile work with stackless? I'd guess no, since it doesn't even work with regular threads, but RunSnakeRun doesn't really have much to do with that.

  3. Marius Gedminas

    Marius Gedminas on 03/31/2009 11:56 a.m. #

    This is a very good presentation about profiling!

    Re: slide 42 ("some assembly required for KCacheGrind") -- there's <a href="">pyprof2calltree</a> on PyPI that helps somewhat (if you can remember what it's called).

    Re: slide 54 ("how do I profile just this one slow page among hundreds?") -- have you seen <a href="">profilehooks</a> on PyPI? Sometimes adding a @profile decorator on your function is simpler than finding the call site and converting it to three lines using profiler.runcall().

    I'll release a newer version with cProfile support later today (oops).

    I also see that there's a different @profile decorator, from <a href="">profilestats</a> on PyPI. Perhaps that one is better maintained ;-)

  4. Mike Fletcher

    Mike Fletcher on 04/01/2009 12:03 a.m. #

    Thanks. Hadn't seen pyprof2calltree, had been using a CookBook recipe turned into a local module for that. Also hadn't seen profilehooks or profilestats.

    There's been a couple of times that people have mentioned the "intrusiveness" of Python profiling/debugging tools at this PyCon. Would be nice if you could parameterize from the command line (or have the interpreter connect to your IDE and request parameterization when you triggered a profile/debug) without needing to alter the code you're working on.

Comments are closed.


Pingbacks are closed.