[Zope] RFC: Flaws in Structured text

Itamar Shtull-Trauring itamars@ibm.net
Mon, 13 Mar 2000 16:59:26 +0200


Pavlos Christoforou wrote:

> I suppose a complete rewrite of stx is in order using a more modular
> interface. For example I was thinking of one class per structure element
> with the appropriate input method to receive the stx text, and a number of
> output methods to produce a variety of formats, html,pdf,rtf etc. This is
> the approach I followed in the Table patch but it is also slower. The
> original stx was designed with performance in mind.

Would using re (so it can take advantage of multithreading) make up for a
more complicated rendering engine?

> One suggestion I have (and it would be relatively easy to implement) is to
> cache the rendered document in a volatile attribute attached to the
> DTMLmethod/Document that contains it, together with a simple checksum of
> the input text. Then we would be free from the performance constrain at
> least to some extent.

This wouldn't work in all cases - consider <dtml-var ZopeTime>, where the
output changes every time it's called.  If an object contains only
strucutred text then you store the rendered text too, and update it every
time the input text changes - the PTK has an object that does this.

-- 
Itamar S.T.  itamars@ibm.net