[Zope-CMF] [CMF 2.1] opaque items calls make performance issue

David Glick davidglick at onenw.org
Mon Aug 3 16:52:56 EDT 2009


On Aug 3, 2009, at 1:46 PM, toutpt wrote:

> Hi,
>
> I m currently profiling the code of Plone to find performance issue  
> and
> fix them (i m sure there are a lot).
>
> There are things I don't understand very well, so sorry if I m wrong.
>
> The code of CMFCatalogAware.opaqueItems parse every attributes of
> plonesite and evaluate this for each attribute:
>
> ICallableOpaqueItem.providedBy(obj)  or
> z2ICallableOpaqueItem.isImplementedBy(obj)
>
> isImplementedBy calls takes 30% of the time spent.
>
> But z2ICallableOpaqueItem is a Zope2 interface and I m not used to  
> this
> kind of object. It seems they are generated on runtime, so for me it's
> hard to debug.
>
> My questions are:
>
> * What are opaqueitems (any example ? I don't have find anything  
> usefull
> in tests of CMFCore)
> * Is zope2 interface are still used and why ?
> * How could I replace those calls, or improved this code that always
> return an empty tuple
>
> PS: sorry for cross posting if there are because i have some issues  
> with my other email address.
>
> - JeanMichel FRANCOIS aka toutpt


This has already been fixed in Plone 4 (by monkey-patching CMF to only  
pay attention to the 'talkback' opaque item which is used for  
discussions).  In Plone 3 you can avoid this performance issue by  
installing the experimental.opaquespeedup package (thanks to Jarn) -- http://pypi.python.org/pypi/experimental.opaquespeedup


David Glick
Web Developer
ONE/Northwest

New tools and strategies for engaging people in protecting the  
environment

http://www.onenw.org
davidglick at onenw.org
work: (206) 286-1235 x32
mobile: (206) 679-3833

Subscribe to ONEList, our email newsletter!
Practical advice for effective online engagement
http://www.onenw.org/full_signup




More information about the Zope-CMF mailing list