[Zope-dev] How to make Zope fail nicely under high load?
Max M
maxm at mxm.dk
Thu Feb 12 03:07:06 EST 2004
Bjorn Stabell wrote:
> Okay, I'd better explain our situation in more detail, then.
>
> The point is, our template is very dynamic, and our application (a BBS)
> is very dynamic as well. We have done one round of optimization
> (basically making things as cacheable as possible) and after testing the
> scalability now we're going to do another round of optimization,
> tweaking the algorithm and removing as many ZCatalog searches as
> possible.
If you are optimising for speed, there is nothing wrong with only making
1 catalog query, and then format the page from that. If possible.
That is basically what php base boards do anyway.
Also if the page is that dynamic, and you need that much speed, maybe
you shouldn't use zpt very much. You could generate the most critical
pages from pure Python.
That would allow for a whole different bag tricks, but still be nicer
than php.
Like caching a generated view and then replacing it vith a python
generated board view.
def re_cache(self)
self.layout_cache = self.board_template(self, self.REQUEST)
def index_html(self):
board_view = self.generate_board_view()
return self.layout_cache.replace('%%board_view%%', board_view)
regards Max M
More information about the Zope-Dev
mailing list