2 Replies Latest reply on Dec 1, 2019 8:25 AM by pmm

    Large allocations in EJBContext#isCallerInRole


      We have a use case where we need to know the roles a user has. We currently do this by iterating over all roles and calling EJBContext#isCallerInRole for each. Unfortunately this results in a lot of allocations. As a short term measure we will migrate to org.wildfly.security.auth.server.SecurityDomain but other use cases or users may benefit from an optimised implementation. Here's a screenshot from a Java Flight Recorder allocation profile, it completely dominates our allocations.

      JFR Allocation Profile