[Twisted-Python] Surprises in twisted.web.woven
dizzyd at jabber.org
Mon Aug 4 17:04:42 EDT 2003
On Monday, Aug 4, 2003, at 11:28 America/Denver, Glyph Lefkowitz wrote:
> On Monday, August 4, 2003, at 07:13 AM, Tim Allen wrote:
>> Is there any reason why white-space preserving should not always be
> Believe it or not, it's a bottleneck.
> In order to preserve whitespace, you have to create a bunch of extra
> Node and str objects, which consume a not-inconsiderable set of
> resources for, let's say, a directory full of reasonably sized Woven
This "bottleneck" is highly dependent on your DOM _implementation_.
Many DOMs normalize adjacent sections of text/CData to avoid this exact
issue. It should be a relatively simple fix to the MicroDOMParser to
avoid extra nodes on adjacent CData sections.
<shameless-plug>You could always look at xish.domish.Element.addContent
as an example. ;) </shameless-plug>
More information about the Twisted-Python