[Framework-Team] Re: Some preliminary Plone 3.0 profiling results
Philipp von Weitershausen
philipp at weitershausen.de
Wed Nov 15 14:45:08 UTC 2006
Sidnei da Silva wrote:
>> You mentioned the thread local idea. That might work. I think we should
>> also investigate memcached. See Tres's mcdutils package, for example:
>> http://agendaless.com/Members/tseaver/software/mcdutils. It's important
>> to note that this cache is absolutely request-specific. It must be
>> invalidated after every request.
> If it needs to be invalidated after every request then the overhead of
> using something like memcached cannot be justified.
Hmm, I bet you're right.
> There are ways of
> associating request-specific information with a Request object in Zope
> 2, which will clear the information when the request is finished. Look
> for request._hold() example in CMFCore/MemberDataTool.py.
Cool. I have two problems with this, though:
* the underscore clearly indicates the "privateness" of the _hold
method. In fact, _hold isn't part of the official Request API, I guess
(if there even is such a thing...)
* this doesn't seem to exist in Zope 3 (at least not in IRequest ;)).
Essentially, _hold() just adds properties to the request object. Why not
use attribute annotations? I think that makes for a bit cleaner approach
while still being flexible enough to make it work in both Zope 2 and 3...
http://worldcookery.com -- Professional Zope documentation and training
More information about the Framework-Team