Commit 52ec5b9f authored by Vincent Pelletier's avatar Vincent Pelletier

erp5_full_text_mroonga_catalog: Optimise object cache usage.

parent 53d10e8e
...@@ -10,6 +10,10 @@ except KeyError: ...@@ -10,6 +10,10 @@ except KeyError:
# Strictly, this could also look-up default activate parameters, but on # Strictly, this could also look-up default activate parameters, but on
# which document ? Traversing is expensive. So keep things fast by default. # which document ? Traversing is expensive. So keep things fast by default.
priority = 1 priority = 1
# Optimise cache usage by reducing the likelyhood of a processing node
# including activities spawned by others into its activity group.
# But prevent the group from going below 10 activities, for better throughput.
group_method_cost = min(.1, 1. / len(getPath))
for document, root_document_path in zip(getPath, getRootDocumentPath): for document, root_document_path in zip(getPath, getRootDocumentPath):
getattr( getattr(
activateObject( activateObject(
...@@ -18,6 +22,7 @@ for document, root_document_path in zip(getPath, getRootDocumentPath): ...@@ -18,6 +22,7 @@ for document, root_document_path in zip(getPath, getRootDocumentPath):
priority=priority, priority=priority,
node='same', node='same',
group_method_id=GROUP_METHOD_ID, group_method_id=GROUP_METHOD_ID,
group_method_cost=group_method_cost,
serialization_tag='full_text_' + root_document_path, serialization_tag='full_text_' + root_document_path,
), ),
METHOD_ID, METHOD_ID,
......
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