[XML-SIG] DOM performance?

Norman Walsh ndw@nwalsh.com
Sat, 08 Jun 2002 09:31:25 -0400


Hello world,

I've been meaning to learn Python for ages and I've finally found the
project that I'm going to use to do so: a little UI thingy with an XML
back end. Ok. so I grabbed PyXML 0.7.1 and installed it on my Linux
box where I've got Python 2.1.

Running a little test program to build a DOM tree (baby steps, to be sure):

import sys
from xml.dom.ext.reader import Sax2

# create Reader object
reader = Sax2.Reader()

print "parse it!"

# parse the document
doc = reader.fromStream(sys.stdin)

print "parsed!"

I'm concerned about the performance. For a small XML document it works
fine, but for the actual 1.4Mb XML document I need to read for my
project, performance is abysmal (after several minutes, I gave up).

Am I doing something obviously wrong?

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | Where it is permissible both to die and
http://nwalsh.com/            | not to die, it is an abuse of valour to
                              | die.--Mencius