Commit 094862d8 authored by Vincent Pelletier's avatar Vincent Pelletier

Iterate just once in method_id_list. This limits the number of values to keep in memory.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19009 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a2d475a1
...@@ -1704,7 +1704,6 @@ class Catalog(Folder, ...@@ -1704,7 +1704,6 @@ class Catalog(Folder,
if not disable_cache: if not disable_cache:
enableReadOnlyTransactionCache(self) enableReadOnlyTransactionCache(self)
method_kw_dict = {}
for method_name in method_id_list: for method_name in method_id_list:
kw = {} kw = {}
if self.isMethodFiltered(method_name): if self.isMethodFiltered(method_name):
...@@ -1756,8 +1755,6 @@ class Catalog(Folder, ...@@ -1756,8 +1755,6 @@ class Catalog(Folder,
if len(catalogged_object_list) == 0: if len(catalogged_object_list) == 0:
continue continue
method_kw_dict[method_name] = kw
#LOG('catalogObjectList', 0, 'method_name = %s' % (method_name,)) #LOG('catalogObjectList', 0, 'method_name = %s' % (method_name,))
method = getattr(self, method_name) method = getattr(self, method_name)
if method.meta_type in ("Z SQL Method", "LDIF Method"): if method.meta_type in ("Z SQL Method", "LDIF Method"):
...@@ -1788,9 +1785,6 @@ class Catalog(Folder, ...@@ -1788,9 +1785,6 @@ class Catalog(Folder,
append(value) append(value)
kw[arg] = value_list kw[arg] = value_list
for method_name in method_kw_dict.keys():
kw = method_kw_dict[method_name]
method = getattr(self, method_name)
method = aq_base(method).__of__(portal_catalog) # Use method in method = aq_base(method).__of__(portal_catalog) # Use method in
# the context of portal_catalog # the context of portal_catalog
# Alter/Create row # Alter/Create row
......
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