[XML-SIG] Re: saxlib 1.0beta
Fredrik Lundh
fredrik@pythonware.com
Fri, 8 May 1998 12:06:53 +0200
Lars wrote:
>> fwiw, we're in the process of releasing our sgmllib/xmllib accelerator.
>> the sgml part is complete; there's still some work to do on the xml stuff.
>> GvR has expressed some interest in shipping this with 1.5.x or what-
>> ever.
>What's this? More details, please! :)
It's an incremental parser written in C, which calls various "handle"
methods on a provided Python instance. Works pretty much like
strop; if you have the module, sgmllib/xmllib will run much faster.
The module is small (the current Win32 DLL is 7680 bytes) and
pretty fast.
>> we've recently done that, and as you say, it was pretty easy. haven't
>> decided yet if/how to release it to the public.
>
>Why not? It would certainly be welcome.
Gotta speak with the boss first ;-)
>[xmllib] is not faster. A speed test on my NT box here in Germany gave
>these results (in seconds) when parsing quran.xml (1 MB) with saxtimer.py:
>
>xmlproc 118
>xmlproc_val 142
>xmllib 148
>xml-toolkit 451
Early tests with xmllib+sgmlop shows that it's about 5 times faster than
pure xmllib (the core parser itself is extremely fast; nearly 10 MB/s on a
P2/333 if you don't bother to call any Python callbacks...). Should be
possible to make it a bit faster without too much work.
Don't have any data yet on the "DOM" stuff (and writing this makes
me realize that I should probably change things so that sgmlop can
talk directly to the tree builder... if I could only find the time...)
Cheers /F
fredrik@pythonware.com
http://www.pythonware.com