On Fri, 04 May 2007 05:17:36 -0700, Tres Seaver
<[EMAIL PROTECTED]> 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
_______________________________________________
Zope-CMF maillist - Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf
See http://collector.zope.org/CMF for bug reports and feature requests