python profiling for a XML parser program

Stefan Behnel stefan_ml at behnel.de
Mon Sep 28 13:18:19 CEST 2009


MacRules wrote:
> I have a python program doing XML data prasing and write the result to 2
> data files; which will be loaded to MySQL.
> [...]
> Is there a python profiler just like for C program?
> And tell me which functions or modules take a long time.

In case you want to do this because you noticed performance problems with
the XML handling code, you might want to take a look at cElementTree (comes
with Py2.5) and/or lxml (separate package). They are the fastest XML
packages for Python, mostly compatible and very easy to use.

Stefan



More information about the Python-list mailing list