When adding an role and assignment to a user who already has a significant number of roles and assignments in place, each role and assignment added takes a longer period of time to process and return a result to the end-user.
- Install a base IDM 6.5.0 with a JDBC repo (Postgres used in my testing) using the sync-with-ldap-bidirectional sample
- Add the following to the start and end of 'defaultMapping.js' to show process timing:
- Download the attached scripts used to perform the testing (48871 - Scripts.zip)
- Start IDM
- Create a user within IDM and modify the 'addRoleMembers.sh' script with this user's _id
- Within a terminal window run the following scripts in this order:
While addRoleMembers.sh is running, you will see the output from cURL for each entry being added:
This can be correlated with the logging output added above to see the volume of time spent within the defaultMapping.js script.
Within my testing:
- On 6.5.0, ~50-60% of the time taken at a higher number of roles was within the defaultMapping.js script
- On 7.0.0 ~90% of the time taken at a higher number of roles was within the defaultMapping.js script. The non-script reduction is possibly due to
In both cases above, the major time sink seems to be a loop around the script evaluation to perform the mergeWithTarget behaviour. This also occurs with replaceTarget to a lesser extent. This loop takes 15-20ms to occur for each role which is already in place which compounds as more roles are added.