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

Improve the performance when listing many jobs

    XMLWordPrintable

    Details

    • Epic Name:
      RoleStrategy-Performance
    • Similar Issues:

      Description

      This affects a jenkins installation with 750+ jobs.

      When loading the "Overview" to list all jobs, the loading time is over 60 seconds.

      With the role-strategy plugin disabled, the loading time goes down to 5 seconds.

        Attachments

          Issue Links

            Activity

            Hide
            olivergondza Oliver Gondža added a comment -
            Show
            olivergondza Oliver Gondža added a comment - Related PR submitted https://github.com/jenkinsci/role-strategy-plugin/pull/28/
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oliver Gondža
            Path:
            src/main/java/com/michelin/cio/hudson/plugins/rolestrategy/Role.java
            http://jenkins-ci.org/commit/role-strategy-plugin/161c0358179a4c845d688b3e42db09f8aa91739d
            Log:
            JENKINS-18377 Cache Role#hashCode to speed up RoleMap#getRolesHavingPermission

            I have experienced severe slowdown caused by following stacktrace:
            at java.util.AbstractSet.hashCode(AbstractSet.java:126)
            at com.michelin.cio.hudson.plugins.rolestrategy.Role.hashCode(Role.java:149)
            at java.util.HashMap.hash(HashMap.java:338)
            at java.util.HashMap.put(HashMap.java:611)
            at java.util.HashSet.add(HashSet.java:219)
            at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap$1.perform(RoleMap.java:310)
            at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap$RoleWalker.walk(RoleMap.java:387)
            at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap$RoleWalker.<init>(RoleMap.java:376)
            at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap$1.<init>(RoleMap.java:307)
            at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap.getRolesHavingPermission(RoleMap.java:307)
            at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap.hasPermission(RoleMap.java:107)
            at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap.access$000(RoleMap.java:75)
            at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap$AclImpl.hasPermission(RoleMap.java:362)

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oliver Gondža Path: src/main/java/com/michelin/cio/hudson/plugins/rolestrategy/Role.java http://jenkins-ci.org/commit/role-strategy-plugin/161c0358179a4c845d688b3e42db09f8aa91739d Log: JENKINS-18377 Cache Role#hashCode to speed up RoleMap#getRolesHavingPermission I have experienced severe slowdown caused by following stacktrace: at java.util.AbstractSet.hashCode(AbstractSet.java:126) at com.michelin.cio.hudson.plugins.rolestrategy.Role.hashCode(Role.java:149) at java.util.HashMap.hash(HashMap.java:338) at java.util.HashMap.put(HashMap.java:611) at java.util.HashSet.add(HashSet.java:219) at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap$1.perform(RoleMap.java:310) at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap$RoleWalker.walk(RoleMap.java:387) at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap$RoleWalker.<init>(RoleMap.java:376) at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap$1.<init>(RoleMap.java:307) at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap.getRolesHavingPermission(RoleMap.java:307) at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap.hasPermission(RoleMap.java:107) at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap.access$000(RoleMap.java:75) at com.michelin.cio.hudson.plugins.rolestrategy.RoleMap$AclImpl.hasPermission(RoleMap.java:362)
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            src/main/java/com/michelin/cio/hudson/plugins/rolestrategy/Role.java
            http://jenkins-ci.org/commit/role-strategy-plugin/165538fc1e85d9ff3bae99ab85035f34a4039440
            Log:
            Merge pull request #28 from olivergondza/optimize-RoleMap-getRolesHavingPermission

            JENKINS-18377 Cache Role#hashCode to speed up RoleMap#getRolesHavingPermission

            Compare: https://github.com/jenkinsci/role-strategy-plugin/compare/8dbec9ea93d1...165538fc1e85

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/com/michelin/cio/hudson/plugins/rolestrategy/Role.java http://jenkins-ci.org/commit/role-strategy-plugin/165538fc1e85d9ff3bae99ab85035f34a4039440 Log: Merge pull request #28 from olivergondza/optimize-RoleMap-getRolesHavingPermission JENKINS-18377 Cache Role#hashCode to speed up RoleMap#getRolesHavingPermission Compare: https://github.com/jenkinsci/role-strategy-plugin/compare/8dbec9ea93d1...165538fc1e85
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Unassigning the issue for now. We have added two Role Strategy plugin project ideas to GSoC 2019: https://jenkins.io/projects/gsoc/2019/project-ideas/. If somebody is interested in co-mentoring the ideas (including these tickets), please let us know

            Show
            oleg_nenashev Oleg Nenashev added a comment - Unassigning the issue for now. We have added two Role Strategy plugin project ideas to GSoC 2019: https://jenkins.io/projects/gsoc/2019/project-ideas/ . If somebody is interested in co-mentoring the ideas (including these tickets), please let us know
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            I have converted this issue to EPIC, because there are multiple low-hanging fruits left to be done

            Show
            oleg_nenashev Oleg Nenashev added a comment - I have converted this issue to EPIC, because there are multiple low-hanging fruits left to be done

              People

              • Assignee:
                Unassigned
                Reporter:
                croesus Croesus Kall
              • Votes:
                14 Vote for this issue
                Watchers:
                23 Start watching this issue

                Dates

                • Created:
                  Updated: