I'm working with ZPTKit so I can use Zope Page Templates with Webware, and functionally things are going well. I'm seeing a performance problem, and hope that someone can point me in the right direction from here.

My setup is Webware 0.8.1 plus ZPTKit and Zope Page Templates, with a very simple template Routes.pt that uses macros and slots defined in standard_template.pt.  There's almost nothing in the corresponding Routes.py file.  If I restart WebKit, then hit the Routes page, the "accessed" time (as reported by stat) reflects the current time.  From then on, if I hit the page again, the Routes.pt file retains it accessed time--that is, it appears not to have been reread.  That's a Good Thing, performance-wise. However, the standard_template.pt file DOES get its accessed time updated with each request for the page, and this seems to be killing performance.

Using 'ab' and a 2K static HTML page, my system can serve about 200 requests per second. Using ZPTs, ZPTKit, standard_template.pt and Routes.pt, I get about 1 page per second.

How can I get standard_template.pt read ONCE at startup and get back up to a reasonable number of requests per second?

David Hancock | dhancock@arinc.com | 410-266-4384