Commit 55ebb4ed authored by Vincent Pelletier's avatar Vincent Pelletier Committed by Eteri

ERP5Catalog: Do not retrieve workflow catalog variables.

These are used nowhere in the code. In many workflows, these
"catalog-available" variables are only configured so they appear as fields on
worklist definitions. So it is understood as more of an informative setting
having a local effect than a normative one having an effect on how
indexation happens.
So shave off a bit of useless time spent in indexation.
Also, it should be mentionned that when profiling this code causes a big
red-herring: this code is the first place where workflow history gets
loaded (and presumably indexed document itself), which draws attention
away from potentially more interesting areas.
parent 56f228e1
...@@ -774,10 +774,6 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject): ...@@ -774,10 +774,6 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
document_object = aq_inner(object) document_object = aq_inner(object)
w = IndexableObjectWrapper(document_object) w = IndexableObjectWrapper(document_object)
wf = getToolByName(self, 'portal_workflow')
if wf is not None:
w.__dict__.update(wf.getCatalogVariablesFor(object))
# Find the parent definition for security # Find the parent definition for security
is_acquired = 0 is_acquired = 0
while getattr(document_object, 'isRADContent', 0): while getattr(document_object, 'isRADContent', 0):
......
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