You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
plone/Products.CMFPlone#3829 describes a case where the adapter factory lookup cache of zope.interface grows without limit causing severe memory problems.
I found the cause: plone.dexterity uses Implements (instead of Provides) in its implementation of the providedBy logic. While Provides supports efficient caching, Implements does not as demonstrated by
Provides achieves this by caching its calls (in a WeakValueDict); Implements does not use such a cache.
While I think that plone.dexterity uses the wrong declaration type (Implements instead of Provides), I believe that Implements should cache its calls like Provides does to improve its caching support.
The text was updated successfully, but these errors were encountered:
plone/Products.CMFPlone#3829 describes a case where the adapter factory lookup cache of
zope.interface
grows without limit causing severe memory problems.I found the cause:
plone.dexterity
usesImplements
(instead ofProvides
) in its implementation of theprovidedBy
logic. WhileProvides
supports efficient caching,Implements
does not as demonstrated byProvides
achieves this by caching its calls (in aWeakValueDict
);Implements
does not use such a cache.While I think that
plone.dexterity
uses the wrong declaration type (Implements
instead ofProvides
), I believe thatImplements
should cache its calls likeProvides
does to improve its caching support.The text was updated successfully, but these errors were encountered: