Commit 1e64ade6 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Tatuya Kamada

Work around performance decrease 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.

This commit reverts fdf4fa44 that does not work in reality.
parent ca080e76
...@@ -1054,6 +1054,8 @@ class Folder(CopyContainer, CMFBTreeFolder, CMFHBTreeFolder, Base, FolderMixIn): ...@@ -1054,6 +1054,8 @@ class Folder(CopyContainer, CMFBTreeFolder, CMFHBTreeFolder, Base, FolderMixIn):
return False return False
return CMFBTreeFolder.hasObject(self, id) return CMFBTreeFolder.hasObject(self, id)
__contains__ = hasObject
# Override Zope default by folder id generation # Override Zope default by folder id generation
def _get_id(self, id): def _get_id(self, id):
if self._getOb(id, None) is None : if self._getOb(id, None) is None :
......
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