[XML-SIG] Preparing for PyXML 0.8

Fred L. Drake, Jr. fdrake@acm.org
Wed, 24 Jul 2002 10:30:28 -0400


Fred L. Drake, Jr. writes:
 > Efficiency.

Ok, I'll say a little more than that.  ;-)

*Memory* efficiency.  Creating a lot of Unicode objects for element
and attribute names from the UTF-8 returned by Expat causes us to use
many copies of the same Unicode strings.  For large documents, that
can make an in-memory DOM prohibitive.  While using an interning
dictionary only lessens the pain somewhat, it's an easy way to get
some memory back without complicating the application code or the DOM
implementation.

It's not clear that it's as helpful for SAX applications.


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation