-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When a Person has as a PersonRole in which the PersonPermission for the Person ClassKind is set to READ doing a GET on SiteDirectory has poor performance #339
Comments
First investigation with the 2 defined configurations :
Associated dumps are contained in the following archive: (each db have setup explained in the issue but instead of having 20 models, there are 30 models) Here are results : new_test_result.txt It seams the we do have a less performant login with the role MODIFY_OWN_PERSON but performance are way better with version 8.0.0-rc25 |
Investigation: new information; The PermissionService for READ action, at SiteDirectory level can hit the database on multiple cases: if the PersonAccessRightKind is READ_IF_PARTICIPANT (not on the current scope) or MODIFY_OWN_PERSON. On that last case, for each Person that is retrieved on the database, a new check is done against the database to check whether the person is a participant within a model that the logged person is also a participant. |
@antoineatrhea that was my suspicion, i think the service is already registered as a per-request, so we can apply some kind of caching routinel Or we can do a more complex, less naive SQL statement in a DAO class to suit the needs and make it more performant. |
@samatrhea making BULK check would be more efficient : instead of checking one instance of each type, why not checking all instances of each type directly ? only one SQL statement would then be made (without any changes on current statement), just need to re-think the way that permission and filtering are done. |
Prerequisites
Description
In the case when there are many EngineeringModels available in a server and when each model has multiple Particpants, a READ on SiteDirectory has poor performance in the following case:
Steps to Reproduce
System Configuration
COMET Web Services version: 7.1.1
The text was updated successfully, but these errors were encountered: