ERP5Catalog: Reduce reliance on user lookup.
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).
Showing
Please register or sign in to comment