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

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

              Created:
              Updated:
              Resolved: