[ZPT] ZPT Speed Tutorial Wanted

Peter C. Norton spacey@lenin.nu
Tue, 10 Sep 2002 14:19:29 -0700


On Tue, Sep 10, 2002 at 11:35:36AM -0500, Andy Meier wrote:
> It's been a while since anyone brought up ZPT speed issues on this list.  Has 
> anyone written or know where to find a tutorial or howto on optimizing ZPT 
> rendering speed?
> 
> Specifically, I'm looking to bring my site made with Page Templates in Zope 
> (http://new.hauntedwisconsin.com) from 1 page a second served to at least 10 
> before I make it replace my current PHP site 
> (http://www.hauntedwisconsin.com) :D

The site seems to be down or otherwise unavailable to me, but I'd
venture that a cache object at the top level with a timeout of 1
minute or so could speed up your site a lot.

Try adding a RAM Cache manager to your site and associate things that
may be slower - python methods, database queries, whatever, to that
cache.  I'm not sure how robust the cache is - it probably only works
for simple memoization, but that should work for a lot of cases.

It seems like if you have forms and things that have shorter cacheable
lifetimes, you can set up a few different caches - like one for things
that'll live for 10 minutes, one for things that live for 2 minutes,
and one for things with a 10 second lifespan.  Or whatever paramaters
get you a 10/second hit rate :)

-- 
The 5 year plan:
In five years we'll make up another plan.
Or just re-use this one.