[Zope] Superfast PageTemplates: Call for expertise

Peter Bengtsson mail@peterbe.com
Tue, 18 Feb 2003 23:38:53 +0000


At 22:45 2003-02-18 +0100, Dieter Maurer wrote:
>Peter Bengtsson wrote at 2003-2-17 22:57 +0000:
>  > ...
>  > My product uses PageTemplates (mostly through PageTemplateFile) and the
>  > PageTemplate stuff really goes at the top of the CPU timing.
>  > I.e. the PageTemplate rendering is "slow". DTML is probably not faster
>
>DTML is much faster...

Hmm. "much". Anybody has any numbers on this?
(in my case it'd be too late now to change however)

>  > and
>  > I'm not "blaming" PageTemplates as such because I understand that they 
> have
>  > a lot of work to do.
>
>  > My question is: How do I ease off the load on PageTemplate rendering?
>  >
>  > What in TAL should generally be avoided, if possible, to gain that extra
>  > performance?
>
>The slowest part for a PageTemplate is its parsing...

Parsing of what? I'm not an engineer but as I've understood it there are 
several different kinds of parsing to go from TAL to HTML.

>   Avoid doing it more than once.
>
>  > Are there any particular constructions that are "bad" to do with TAL
>  > syntax/formatting?
>
>I do not think so.
>
>  > (I've heard that METAL is "slow" but they're difficult to avoid 
> because of
>  > their great functionality)
>
>I cannot confirm this.
>
>Someone started to code PageTemplates in C. I think, I read something
>about this in the "xml-sig" mailing list.
>
>A little less drastic would be to replace the "HTMLParser"
>and use, e.g. "sgmlop".

That sounds interesting but I'm not up for it myself.

Peter


>Dieter