In know this is purely speculation, but what about caching page-templates in some intermediate format like ESIS, and writing a lexical scanner for the TALES structure in C/Flex with callbacks to Python for code evaluation and object traversal? Obviously, this isn't trivial, but I imagine it would be interesting... Sean -----Original Message----- From: Dieter Maurer [mailto:dieter@handshake.de] Sent: Tuesday, February 18, 2003 1:45 PM To: Peter Bengtsson Cc: zope@zope.org Subject: Re: [Zope] Superfast PageTemplates: Call for expertise 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...
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... 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". Dieter _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )