Commit fc970248 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

readd work around for the performance regression introduced in Zope 2.12.23 in...

readd work around for the performance regression introduced in Zope 2.12.23 in HBTreeFolder2, for the case where we use HBTreeFolder2 directly.
parent 08569a57
......@@ -1061,6 +1061,9 @@ class Folder(CopyContainer, CMFBTreeFolder, CMFHBTreeFolder, Base, FolderMixIn):
return False
return CMFBTreeFolder.hasObject(self, id)
# Work around for the performance regression introduced in Zope 2.12.23.
# Otherwise, we use superclass' __contains__ implementation, which uses
# objectIds, which is inefficient in HBTreeFolder2 to lookup a single key.
__contains__ = hasObject
# Override Zope default by folder id generation
......
......@@ -358,6 +358,11 @@ class HBTreeFolder2Base (Persistent):
return 0
return 1
# Work around for the performance regression introduced in Zope 2.12.23.
# Otherwise, we use superclass' __contains__ implementation, which uses
# objectIds, which is inefficient in HBTreeFolder2 to lookup a single key.
__contains__ = has_key
def _htree_iteritems(self, min=None):
# BUG: Due to bad design of HBTreeFolder2, buckets other than the root
# one must not contain both buckets & leafs. Otherwise, this method
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment