Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
52ec5b9f
Commit
52ec5b9f
authored
May 20, 2020
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_full_text_mroonga_catalog: Optimise object cache usage.
parent
53d10e8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
bt5/erp5_full_text_mroonga_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_deferFullTextIndex.py
...atalog/erp5_mysql_innodb/SQLCatalog_deferFullTextIndex.py
+5
-0
No files found.
bt5/erp5_full_text_mroonga_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_deferFullTextIndex.py
View file @
52ec5b9f
...
...
@@ -10,6 +10,10 @@ except KeyError:
# Strictly, this could also look-up default activate parameters, but on
# which document ? Traversing is expensive. So keep things fast by default.
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
):
getattr
(
activateObject
(
...
...
@@ -18,6 +22,7 @@ for document, root_document_path in zip(getPath, getRootDocumentPath):
priority
=
priority
,
node
=
'same'
,
group_method_id
=
GROUP_METHOD_ID
,
group_method_cost
=
group_method_cost
,
serialization_tag
=
'full_text_'
+
root_document_path
,
),
METHOD_ID
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment