Closed samatstariongroup closed 8 months ago
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 old_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.
Investigation: new information;
The PermissionService, 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