-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
The DnRoleMapper class is used to map distinguished names of groups and users to role names. This mapper builds in an internal map that maps from a com.unboundid.ldap.sdk.DN to a Set<String>. In cases where a lot of distinct DNs are mapped to roles, this can consume quite a bit of memory; in one case a single DnRoleMapper was found to consume over 1GB of heap space.
The majority of the memory is consumed by the DN object. A 94 character DN that has 9 relative DNs (RDN) will retain 4KB of memory. The majority of this memory comes from building objects for the relative dns and retaining those which includes their ASN1 representation.
We should look and see if we can optimize the memory usage of this class so that heap space can be better utilized.