xml processing speed test
K.S.Sreeram
sreeram at tachyontech.net
Thu Jun 8 01:23:52 EDT 2006
Fredrik Lundh wrote:
> by using it to split your document into reasonably-sized chunks (one
> record, one expression, one text block, one paragraph, etc), and using
> Python code to process the chunks.
I've updated cElementTree/iterparse implementation to build one full
expression at a time.
http://sreeram.cc/files/xmlspeed/py_etree.py
Here are the updated timings:
Input file size 80mb:
C/Expat: 4.25 secs
Python/cElementTree: 11.78 secs (down from 15.52 secs)
Python/pyexpat: 16.10 secs
Input file size 800mb:
C/Expat: 105 secs
Python+cElementTree: 157 secs (down from 184 secs)
Python+pyexpat: 191 secs
Regards
Sreeram
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20060608/26350d6b/attachment.sig>
More information about the Python-list
mailing list