An error occurred fetching the project authors.
- 25 Oct, 2018 2 commits
-
-
Vincent Pelletier authored
Use Owner role to help filling user_set: owners must be users, never groups. Only look for users among group_ids when they are candidate for indexation into a catalog_role column. This should very significantly reduce the number of user lookups, even bringing it to zero on instance with default catalog setting of catalog_role_set = set(["viewable_owner"]) . Also, only look for users if there are candidates for lookup. Also, rename local variable to better describe its content. Also, use set.__iadd__ instead of set.update (shorter).
-
Vincent Pelletier authored
Test loop invariant outside of loop. Use clearer and more consistent variable names. Avoid iterating twice when once is enough, allowing removal of "local_role_dict" local and simplification of corresponding dict structure. Avoid creating new instances when the existing one can be mutated. Evaluate dict as boolean instead of constructing an empty dict to compare against. Avoid using %-operator just to concatenate strings (allows en-passant typechecking). Drop unused locals. Do not use a dict when a set would be sufficient.
-
- 09 Mar, 2018 1 commit
-
-
Vincent Pelletier authored
-
- 07 Mar, 2018 1 commit
-
-
Ayush Tiwari authored
Also, while exporting catalog methods, explicitly check for `expression_instance` property. Now we keep expression_instance property in a volatile attribute, so we should prefer using it.
-
- 20 Nov, 2017 2 commits
-
-
Ayush Tiwari authored
And, Patch changeObjectClass extension to remove useless attributes Copying __dict__ from one object to another brings us to situation where we don't have many objects which we don't need at all, for example, migrating objects with subclasses who were initially OFS objects and later an ERP5 object can lead to adding subobjects as attributes of the new object, which is completely undesirable. To handle this, it is important to delete the sub-objects as the attributes for those migrated classes. Old Catalog Tool didn't have portal_type attribute, so while migrating via synchronizeDynamicModule, after _bootstrap, we expect the tool to have a portal_type to finalize migration. This step is now being done only at the end of _bootstrap after we change the classes for portal_catalog and its sub-objects.
-
Ayush Tiwari authored
- This step is needed due to the use of BaseTool as Base class for CatalogTool due to which there were conflict between reindexObject from the Base and the one from the BaseTool.
-
- 03 Oct, 2017 1 commit
-
-
Ayush Tiwari authored
-
- 15 Sep, 2017 2 commits
-
-
Vincent Pelletier authored
-
Vincent Pelletier authored
This way it is easier to further extend it without risking key conflicts in catalog parameters, which in turn would either lead to simple TypeErrors ("multiple values for parameter ...") or to criterion being accidentally ignored. Update callers. These methods are young enough that no other callers should exist yet.
-
- 13 Sep, 2017 1 commit
-
-
Vincent Pelletier authored
Also, document that value order in base_category_dict is meaningless.
-
- 01 Sep, 2017 3 commits
-
-
Kazuhiko Shiozaki authored
If strict_language is False, a document having the other language is chosen if the specified language one is missing. all_languages=True returns results grouped by (reference, language) so that we can have several documents for a single reference. strict_language=False returns results grouped by (reference,) only, with considering the language priority, thus we have only one document for a single reference.
-
Kazuhiko Shiozaki authored
-
Vincent Pelletier authored
Also, simplify code flow by removing unnecessary "if" statements. Also, simplify returned query tree by removing unnecessary intermediate ComplexQueries.
-
- 31 Aug, 2017 1 commit
-
-
Vincent Pelletier authored
One part working on {base_category_id: [document_value_set]}, and the other producing that structure out of a flat list of (base_category_id-prefixed) category relative urls. The former used to be included in the latter, but in some case caller already has the documents handy instead of only urls, in which case we can avoid a layer of document lookups.
-
- 25 Aug, 2017 1 commit
-
-
Kazuhiko Shiozaki authored
-
- 27 Jul, 2017 4 commits
-
-
Vincent Pelletier authored
-
Vincent Pelletier authored
-
Vincent Pelletier authored
Less ambiguous than previous syntax while keeping names short. Allows defining more flags without limiting base_category namespace: the only forbidden base_category id is "related", which was already reserved (ie, not working) in previous syntax.
-
Vincent Pelletier authored
-
- 28 Jun, 2017 2 commits
-
-
Vincent Pelletier authored
-
Vincent Pelletier authored
Catalog does not need "resource_uid" when it requested for "resource_use_uid", so don't spend time computing it.
-
- 18 May, 2017 1 commit
-
-
Vincent Pelletier authored
These are the easy uses, there are more to come.
-
- 14 Apr, 2017 2 commits
-
-
Vincent Pelletier authored
Allows reducing the number of user existence check queries from one per document to one per document batch, reducing database (currently, catalog) latency effect on indexation time. Also, avoid object -> id -> object dance for SQLCatalog instance while at it. Also, modernise syntax a bit, avoiding intermediate locals mostly.
-
Vincent Pelletier authored
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.
-
- 05 Apr, 2017 1 commit
-
-
Vincent Pelletier authored
-
- 03 Apr, 2017 1 commit
-
-
Vincent Pelletier authored
ComplexQuery bypasses SearchKey mechanism and makes assumptions SQLCatalog.{search|count}Results does not do. Instead, reserve a name, and complain if it is passed by caller.
-
- 23 Dec, 2016 1 commit
-
-
Vincent Pelletier authored
-
- 20 Dec, 2016 3 commits
-
-
Vincent Pelletier authored
Allows accessing any catalog column after parent relation, instead of only pre-configured columns. Allows reverse relation lookup (for the non-parent part of the relation, as child relationship is not supported). Also, drop now-redundant related keys.
-
Vincent Pelletier authored
Simplifies extension. Also, factorise constants a bit.
-
Vincent Pelletier authored
Otherwise, longer results would be truncated and shorter results would produce activities with an empty list as argument.
-
- 12 Dec, 2016 1 commit
-
-
Vincent Pelletier authored
It does not depend on a specific plugin. Also, update all importers. Also, reduce import cycles in ERP5Security.
-
- 24 May, 2016 3 commits
-
-
Vincent Pelletier authored
Fix a misnamed local. Use iteritems. Move variables next to the loop they act on. Rewrite comments to better reflect the intention when it is not obvious in the implementation. Move a loop-invariant out of loop ((user, role) not in optimized_role_set). Do not use set.update on an iterable constructed just for the call, call set.add on each item.
-
Vincent Pelletier authored
Global role computation is very expensive, don't do it when all we are interested in is user existence. Also, list all users having local roles in one call to reduce the effect of per-call overhead. This should improve indexation speed by a large fraction: pprofile statistical run on and activity node busy reindexing objects shows: - 57% of time spend generating (13%) and executing (44%) SQL - 42% of time spent preparing object for indexation: - 29% in _getSecurityParameterList, all in getUserById - 12% in getCatalogVariablesFor (workflow variables to index) So an improvement of close to 30% is expected.
-
Vincent Pelletier authored
Its parameter is a loop invariant, so avoid looking the same user up once per local role.
-
- 12 Jan, 2016 1 commit
-
-
Kazuhiko Shiozaki authored
-
- 24 Sep, 2015 1 commit
-
-
Vincent Pelletier authored
Likewise for positional REQUEST parameter.
-
- 23 Sep, 2015 2 commits
-
-
Jérome Perrin authored
-
Vincent Pelletier authored
local_roles is handled entirely inside ERP5Catalog, so to not tell ZSQLCatalog about it - it can do nothing right with it anyway. Also, get rid of abusive **kw use in this code path. Also, actually pass sql_catalog_id to getAllowedRolesAndUsers.
-
- 14 Aug, 2015 2 commits
-
-
Vincent Pelletier authored
Also, do not use getBaseCategoryDict to avoid mutating cached value and use a set rather than a None-value dict. Also, access portal_categories from portal explicitly rather than relying on acquisition.
-
Vincent Pelletier authored
"to split" is an irregular verb. Also, drop badly-worded comment.
-