The barebones profiling method that is surprisingly effective

2014-05-27 08:01:06 -0400

I'm working on profiling my time series database (TsTables) because append performance is not what I want it to be. I know that the issue is a few loops that are written in Python instead of using NumPy's optimized vector operations. I'm not exactly sure which loop is the slowest.

I started trying to get cProfile to work, but ended up with way too much data to be useful. So I reverted to my old school, barebones profiling method: Ctrl-C.

How do you use this method you might ask? Start your program and randomly hit Ctrl-C. Wherever your program stops most frequently is the probably the slowest part. Speed that up and repeat!