[Zope] TAL page whitespace removal
Chris Withers
chris at simplistix.co.uk
Thu Apr 13 04:24:41 EDT 2006
Robert (Jamie) Munro wrote:
> gzip will add enormous processing overhead to the server. Striping
> spaces will add negligible overhead, likely less overhead than it saves.
I hope you've got a full set of tests that prove these sweeping
statements you're making ;-)
> I have written TAL that produces very large dumps of XML data in the
> past, even whole sites. It's a really nice way to dump data from a
> database (SQL or Zope DB), but Zope has to build the whole output in RAM
> before sending any of it, so it can cause the site to crash.
Then write your code better. While it's easiest to do this all in
memory, it doesn't scale, as you're explaining...
> I would
> hope in this kind of case that the TAL is the major user of RAM on the
> site,
Actually, unless you're careful, you're likely to be dragging all the
zope objects into memory too, and that'll be what's really killing it ;-)
_p_deactivate and zodb object cache minimisation are your friends ;-)
> so any saving would be really good, but it all cases (except <pre>
> tags, which I would never use) it seems like a possibly significant gain.
I'm afraid I think you're mistaken. Speed-wise, I'll bet the security
architecture will cost you much more than gzip _and_ space stripping
combined ;-) For memory, doing the whole thing in one go simply won't
scale, so you'll have to re-think...
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
More information about the Zope
mailing list