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