Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-55804

Performance: Reduce memory footprint and execution time for RoleMap#newMatchingRoleMap()

    Details

    • Similar Issues:
    • Released As:
      Role Strategy 2.10

      Description

      newMatchingRoleMap() is a root method in RoleStrategy#getACL() : https://github.com/jenkinsci/role-strategy-plugin/blob/a2069c1fcb56ff0cd8b80a0655931f5974634eee/src/main/java/com/michelin/cio/hudson/plugins/rolestrategy/RoleBasedAuthorizationStrategy.java#L124 . Its performance is not ideal, because the underlying method creates an intermediate collection for matching roles: https://github.com/jenkinsci/role-strategy-plugin/blob/6b91d9fa597fb6b6766589556aab4ab5d727368e/src/main/java/com/michelin/cio/hudson/plugins/rolestrategy/RoleMap.java#L340 

      It would be great to improve performance by refactoring newMatchingRoleMap() and getMatchingRoles() to have an iterator-based RoleWalker logic without intermediate collections

       

        Attachments

          Activity

          oleg_nenashev Oleg Nenashev created issue -
          oleg_nenashev Oleg Nenashev made changes -
          Field Original Value New Value
          Epic Link JENKINS-18377 [ 149684 ]
          oleg_nenashev Oleg Nenashev made changes -
          Assignee Oleg Nenashev [ oleg_nenashev ]
          deepansh_nagaria Deepansh Nagaria made changes -
          Assignee Deepansh Nagaria [ deepansh_nagaria ]
          Hide
          deepansh_nagaria Deepansh Nagaria added a comment - - edited

          I attempted this issue. Here's the pr: https://github.com/jenkinsci/role-strategy-plugin/pull/53 please correct me where ever required.

          Show
          deepansh_nagaria Deepansh Nagaria added a comment - - edited I attempted this issue. Here's the pr: https://github.com/jenkinsci/role-strategy-plugin/pull/53 please correct me where ever required.
          deepansh_nagaria Deepansh Nagaria made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          deepansh_nagaria Deepansh Nagaria made changes -
          Status Closed [ 6 ] Fixed but Unreleased [ 10203 ]
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          It was released in Role Strategy 2.10

          Show
          oleg_nenashev Oleg Nenashev added a comment - It was released in Role Strategy 2.10
          oleg_nenashev Oleg Nenashev made changes -
          Status Fixed but Unreleased [ 10203 ] Resolved [ 5 ]
          Released As Role Strategy 2.10

            People

            • Assignee:
              deepansh_nagaria Deepansh Nagaria
              Reporter:
              oleg_nenashev Oleg Nenashev
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: