[Twisted-Python] Surprises in twisted.web.woven

Glyph Lefkowitz glyph at twistedmatrix.com
Mon Aug 4 13:28:44 EDT 2003


On Monday, August 4, 2003, at 07:13 AM, Tim Allen wrote:

> Is there any reason why white-space preserving should not always be on?

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 
templates.

This cost is exacerbated by the fact that woven copies and inspects the 
entire tree of DOM objects on every page render.

Last I profiled this was many months ago, however; I was seeing serious 
performance problems with Woven which have since been optimized in 
other ways.  I'd be interested in hearing your results if you try it 
otherwise.





More information about the Twisted-Python mailing list