Use of Python with GDAL. How to speed up ?
kent at kentsjohnson.com
Wed Mar 22 14:28:57 CET 2006
Julien Fiore wrote:
> Thanks Caleb for the advice,
> I profiled my code with the following lines:
> import profile, pstats
> p = pstats.Stats('profile.log')
> The outputs tells me that the openness() function takes most of the
> time. This is not very useful for me, as openness() contains most of my
> code. How to know which instructions take most time in the openness
> function ? Do I have to separate the code into smaller functions ?
Yes. The profiler collects statistics for functions, not for individual
lines of code.
More information about the Python-list