When AEM users login, the compiled permissions are taking a lot of the heap space and are moving directly to the old gen heap space ? On inspection I notice that each of the PrincipalPermissionsEntry is holding a lot of references to the jcr nodes that these nodes that are not related to the PrincipalPermissionsEntry as well. Can this behavior be explained and is there a way AEM allows control over these compiled permissions so we can reduce the overhead of these huge permissions entries that are being composed ? There is a no documentation as to how this works and what are the best practices on the compiled user permissions ?
Attached below is a heap dump that is showing these compiled permission entries