Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-13754

HibernateGroupManager.hasExternalMembership() is slow for group with thousands of users

XMLWordPrintable

      The ConfluenceGroupJoiningAuthenticator calls getGroupManager().hasMembership which in turn calls hasExternalMembership(). This causes loading of users of that group, which can be extremely slow if the group has thousands of users.

      If you're writing a custom authenticator, the workaround here is to use something like this instead:

       boolean permission = permissionManager.hasPermission(getUserAccessor().getUser(username),Permission.VIEW, PermissionManager.TARGET_APPLICATION);
      

      Check the source attached here.

        1. bug.gif
          bug.gif
          0.3 kB
        2. bug.gif
          bug.gif
          0.3 kB
        3. bug.gif
          bug.gif
          0.3 kB
        4. bullet_creme.gif
          bullet_creme.gif
          0.1 kB
        5. bullet_creme.gif
          bullet_creme.gif
          0.1 kB
        6. bullet_creme.gif
          bullet_creme.gif
          0.1 kB
        7. bullet_creme.gif
          bullet_creme.gif
          0.1 kB
        8. bullet_creme.gif
          bullet_creme.gif
          0.1 kB
        9. bullet_creme.gif
          bullet_creme.gif
          0.1 kB
        10. bullet_creme.gif
          bullet_creme.gif
          0.1 kB
        11. bullet_creme.gif
          bullet_creme.gif
          0.1 kB
        12. bullet_creme.gif
          bullet_creme.gif
          0.1 kB
        13. ConfluenceGroupJoiningAuthenticator.class
          3 kB
        14. ConfluenceGroupJoiningAuthenticator.java
          4 kB
        15. linkext7.gif
          linkext7.gif
          0.2 kB
        16. linkext7.gif
          linkext7.gif
          0.2 kB
        17. linkext7.gif
          linkext7.gif
          0.2 kB
        18. linkext7.gif
          linkext7.gif
          0.2 kB
        19. linkext7.gif
          linkext7.gif
          0.2 kB
        20. linkext7.gif
          linkext7.gif
          0.2 kB
        21. priority_critical.gif
          priority_critical.gif
          0.2 kB
        22. priority_major.gif
          priority_major.gif
          0.1 kB
        23. priority_major.gif
          priority_major.gif
          0.1 kB
        24. spacer.gif
          spacer.gif
          0.0 kB
        25. spacer.gif
          spacer.gif
          0.0 kB
        26. spacer.gif
          spacer.gif
          0.0 kB
        27. status_open.gif
          status_open.gif
          0.3 kB
        28. status_open.gif
          status_open.gif
          0.3 kB
        29. status_open.gif
          status_open.gif
          0.3 kB

              dave@atlassian.com dave (Inactive)
              jlargman Jeremy Largman
              Votes:
              4 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: