Reasonable first-run of Profiling talk

Did a version of the PyCon talk on profiling at HackLab's weekly Python Newbies night this evening.  This was a bit of a "kitchen sink" presentation; every thought I had on the topic thrown into a presentation to see what stuck.  As a result it was around an hour long (pushing to get it done that fast).  The big TODOs:

  • need to have a few slides at the beginning giving a simple, graphical "what is profiling" introduction (to replace the current midway "how does profiling work" section)
  • need to watch out for jargon, one of the new programmers found sections hard to follow due to some of the CS terms
  • can compress a lot of the "why profile Python" section, it seemed to be interesting to people, but it doesn't help with how to get the job done
  • people seemed to "get" the pstats view relatively quickly, can reduce the amount of time discussing that, graphical build-up at the start should help here too
  • kcachegrind and runsnakerun GUIs were confusing, building up the graphical "what is profiling" using the same graphics should help
  • need to mention the Python 3.0 performance issues... avoiding 3.0 is just something I do automatically when considering performance, apparently
  • need to discuss the value of algorithmic improvement much faster, can't assume that O(n) notation is familiar to everyone (we spent 3 or 4 minutes just explaining that), probably want to just drop the O(n) stuff entirely and use an example instead
  • the sections on hard-to-profile situations and interesting hotspots were well received, but they are dangerous, many of them are 5-10 minute stories and I *love* digressions

All in all, people seemed to find it useful. There were 3 new programmers and 2 relatively established programmers.  Most of them seemed to find it interesting.  Feel reasonably good about the presentation and have an image now of where I want to go with it and what really interests people about the topic.


  1. Marius Gedminas

    Marius Gedminas on 03/13/2009 2:01 a.m. #

    Anecdotes and war stories are always good to hear.

    A couple of graphs (time versus problem size) can replace or explain O(n) notation. Then there's the classical box diagram "if you make this small box 10 times faster, you only win x%, but if you make this big box 10% faster, you win yy% overall" explanation of why profiling is important.

    You make me wish I was coming to PyCon. Are you going to EuroPython this year? Please?

  2. Doug Napoleone

    Doug Napoleone on 03/13/2009 2:16 a.m. #

    Digressions... like how global warming helps Canada? ;-)

    I really really hope you have an open space follow up on profiling.. I know there could be a number of very very interesting rat holes people could get lost down which deserve exploration.

  3. Mike Fletcher

    Mike Fletcher on 03/13/2009 5:48 p.m. #

    Graphics are definitely the way I'm planning to go.

    Not all that likely for EuroPython, my advertising budget is pretty much used up with the 8 days at PyCon.

    @Doug, yup, I'm expecting to have a more interactive session in the Open Space on profiling (and debugging).

Comments are closed.


Pingbacks are closed.