[Zope-CMF] allowedContentTypes slowness

Alexander Limi limi at plone.org
Wed Dec 17 18:19:08 EST 2003

Developers, developers,

Did some profiling of Plone on a customer site last night, and along with  
Tesdal I discovered that allowedContentTypes is called *twice* on any page  
render, and it's one of the most expensive methods in the CMF.

We reduced it to only being called once, but still - it's the most  
expensive part of a template when anything is rendered.

Tesdal commented that the method in CMF again and again checks whether the  
product and the factory exists, is it possible to make this one call  
instead of multiple? I assume it's pretty expensive:

if getSecurityManager().validate(p, p, self.factory, m):


Is there anything that can be done about this? I'm not a kick-ass  
optimizer, but maybe somebody can comment on this? :)

(cross-posted to Plone-dev and CMF lists, I assume we both are interested.)


  Alexander Limi   ·   Interaction Architect   ·   Plone Solutions

  Development · Training · Support · http://www.plonesolutions.com

  Plone Co-Founder   ·   http://plone.org   ·   Connecting Content

      高联合  ·  アレクサンダー リミ  ·  이미짱  ·  อเล็กซานเดอร์ ลีมิ

More information about the Zope-CMF mailing list