python profiling for a XML parser program

MacRules MacRules at none.com
Sat Sep 19 22:36:31 CEST 2009


Paul Boddie wrote:
> On 19 Sep, 21:19, MacRules <MacRu... at none.com> wrote:
>> Is there a python profiler just like for C program?
>> And tell me which functions or modules take a long time.
>>
>> Can you show me URL or link on doing this task?
> 
> Having already looked at combining Python profilers with KCachegrind
> (as suggested by Andrew Dalke at EuroPython 2007), I discovered the
> following discussion about the tools required:
> 
> http://ddaa.net/blog/python/lsprof-calltree
> 
> I found the following script very convenient to generate profiler
> output:
> 
> http://www.gnome.org/~johan/lsprofcalltree.py
> 
> You can then visualise the time spent by just passing the output file
> to KCachegrind:
> 
> http://kcachegrind.sourceforge.net/html/Home.html
> 
> The map of time spent in each function is extremely useful, I find.
> 
> Paul

Paul is better than Google.

Thanks for the info, I will take a look.



More information about the Python-list mailing list