[Zope-CMF] Re: Making TypesTool faster

Alexander Limi limi at plone.org
Mon May 7 11:34:12 EDT 2007

On Fri, 04 May 2007 05:17:36 -0700, Tres Seaver  
<tseaver at palladion.com> wrote:

> I think I misunderstood:  you guys have actually measured that the
> 'manage_addProducts[product]' dance is taking measurable time when
> building the add list?  I thought we were trying to cache the result of
> the whole lookup, especially the meta_type-is-allowed +
> user-has-permission checks, which I would imagine are much more
> expensive than the factory dispatcher lookup.

Actually, it seems to be — but I'm not a programmer — I just know that  
when we cached the result of that lookup locally, the whole thing is about  
twice as fast overall. That's including our metatype-is-allowed and  
has-permission checks.

> That said, I didn't really understand the patch as earlier proposed;
> I'm sorry for not reading more carefully.

Did you have time to look at it now?

>> If the two are orthogonal, and we already have a sane patch, then why  
>> not
>> (at least if we can get some tests in place) fix the one at the CMF  
>> level
>> and deal with the other Archetypes issue separately.
> If factory dispatcher lookup is truly the hotspot, then we should be
> fixing it even lower in the stack (at the Zope level).

It's just my experience that it's harder to get small optimizations into  
Zope for these kinds of things, as it's more likely that people rely on  
side effects like this (the fact that the list of products can change  
without restarting) there. But if you think it can be done on that level,  
it would of course be the optimal location to do it.

Alexander Limi · http://limi.net

More information about the Zope-CMF mailing list