Need Psyco profiling help...

Andrew Bennetts andrew-pythonlist at puzzling.org
Fri Oct 24 22:12:19 EDT 2003


On Sat, Oct 25, 2003 at 01:49:40AM +0000, KefX wrote:
> 
> But to optimize, I need to find a bottleneck, using a profiler. An obvious way
> to do this with Psyco is to just use psyco.log('somefile.log') and then
> psyco.profile()...however most of the time seems to be spent in Psyco's
> active_start function! I decided the profiler may well be screwy so I tries

As far as I'm aware, there's no way to use the standard python profiling
tools to profile non-python functions, like C extension functions or
psyco'd functions.  Your best bet is to probably profile without psyco, and
optimise the bottlenecks you find in pure python.  When you're done, try
using psyco again and see if performance is good enough.  Very roughly
speaking, two psyco'd functions are likely to have roughly the same relative
performance as they did before psycoing, so hopefully this approach is good
enough to get the improvements you need.

-Andrew.






More information about the Python-list mailing list