[XML-SIG] PyDOM performance
Greg Stein
gstein@lyra.org
Wed, 25 Aug 1999 08:31:21 -0700 (PDT)
If the DOM is not a specific requirement, and you simply need to translate
XML into a usable form for Python, then you may want to look at my qp_xml
module at http://www.lyra.org/greg/python/
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
On 25 Aug 1999, Carey Evans wrote:
> Hi.
>
> I've been rather disappointed with the speed when trying out the DOM
> support in the XML 0.5.1 package. To construct a tree of the fairly
> simple document at
>
> http://home.clear.net.nz/pages/c.evans/diary/hols199901.xml
>
> took about 45 seconds. I tried out the CVS tree and got this down to
> 17.8 seconds, which is quite an impressive improvement by itself, when
> PyDOM doesn't seem to have changed much.
>
> Looking at this with the profiler, dom/core.py spends a *lot* of time
> in __getattr__ and __setattr__. I didn't have anything better to do,
> so I rewrote these methods and got the time down to 11.7 seconds.
> I've attached the patch to do this below.
>
> My questions are:
>
> Is what I'm doing in this patch actually working, or am I on the
> wrong track?
>
> And, is it worth doing anything to PyDOM, or would I be better off
> looking at 4DOM, for example?
>
> Thanks.
>
> --
> Carey Evans http://home.clear.net.nz/pages/c.evans/
>
> "This is where your sanity gives in..."
>
>