[ZPT] ZPT Speed Tutorial Wanted

Jim Fulton jim@zope.com
Mon, 16 Sep 2002 09:11:21 -0400


Andy Meier wrote:

...

> My final bottleneck seems to be using Page Templates.  Even a simple Page 
> Template costs me 400ms to render.  To compare, rendering a fairly simple 
> DTML document takes 9ms.

This is realy a much bigger difference than we've seen. We've seen page templates
take 2-3x longer than DTML, not 40x. Are you sure you are comparing ZPT and DTML
templates that do the same thing?

It turns out that a lot of the speed hit, at least in the tests we've done
has to do with the way ZPT does security checks.

> Is there anything I can do to increase the speed of Page Templates (can I 
> "pre-compile" the templates)?  Should I convert my page template into a 
> python script or dtml document header and footer?

It would be helpful to create a benchmark that does the same thing in
ZPT and DTML and that shows this speed difference. We do have a project
under way at ZC to do another round of performance improvements. We have
a menchmark we are using, but you might be able to provide a better one.

Jim


-- 
Jim Fulton           mailto:jim@zope.com       Python Powered!
CTO                  (888) 344-4332            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org