XML parsing speed

John Wilson tug at wilson.co.uk
Fri May 23 04:46:27 EDT 2003


----- Original Message ----- 
From: "Jamie" <jamierh_76 at hotmail.com>
Newsgroups: comp.lang.python
To: <python-list at python.org>
Sent: Friday, May 23, 2003 2:02 AM
Subject: XML parsing speed


> Hi all,
>
> Do any of you know of any tricks/techniques to speed up XML parsing in
> Python? The SAX takes 40+ seconds to parse 1.5 MB of XML data. Have any of
> you managed to get around this problem?

This doesn't sound right.

What are you doing in the code which handles the SAX events?

Time the parse without calling setContentHandler so that you can see how
much time is actually spent in the XML parser.

I suspect you are doing something very time consuming in one of the SAX
callbacks.

John Wilson
The Wilson Partnership
http://www.wilson.co.uk






More information about the Python-list mailing list