Commit 9180b754 authored by Julien Muchembled's avatar Julien Muchembled

Speed up PortalTypeMetaClass.getAccessorHolderPropertyList by ~10%

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43423 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0adcc832
......@@ -143,17 +143,12 @@ class PortalTypeMetaClass(GhostBaseMetaClass, PropertyHolder):
@see Products.ERP5Type.Base.Base._propertyMap
"""
cls.loadClass()
property_id_set = set()
property_list = []
property_dict = {}
for klass in cls.mro():
if klass.__module__ == 'erp5.accessor_holder':
for property in klass._properties:
if property['id'] in property_id_set:
continue
property_id_set.update([property['id']])
property_list.append(property)
return property_list
property_dict.setdefault(property['id'], property)
return property_dict.values()
def resetAcquisition(cls):
# First, fill the __get__ slot of the class
......
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