[XML-SIG] How do I write an efficient parser?

Don Allingham dallingham@users.sourceforge.net
22 Sep 2001 15:35:29 -0600


My project has been using the SAX parser under 1.5.2 and 2.X. The XML
file contains genealogy information. When I have about 2000 people in
the database, the expat parser reads it in a reasonable amount of time -
a few seconds, not too long for the user.

However, when I starts reaching the 6000-7000 entries, it can take up to
a minute or longer. At 50000, it takes several minutes, which is just
unacceptable.

All the parser is doing is building an in-memory structure. The best I
can tell is that python's function call overhead is killing performance.

Is there a way to write a more efficient parser without having to resort
to C?

-- 
Don Allingham
dallingham@users.sourceforge.net

GPG/PGP Public Key at
http://members.home.net/donaldallingham/dallingham.key