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

Performance: Use User#getById() instead of User#get()

    Details

    • Similar Issues:

      Description

      User#get() has serious performance issues, and starting from Jenkins 1.651 it is recommended to use another API. After JENKINS-47718 it may require another update

        Attachments

          Issue Links

            Activity

            Show
            oleg_nenashev Oleg Nenashev added a comment - https://github.com/jenkinsci/ownership-plugin/pull/68
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            src/main/java/com/synopsys/arc/jenkins/plugins/ownership/OwnershipDescription.java
            src/main/java/com/synopsys/arc/jenkins/plugins/ownership/OwnershipPlugin.java
            src/main/java/com/synopsys/arc/jenkins/plugins/ownership/jobs/JobOwnerHelper.java
            src/main/java/com/synopsys/arc/jenkins/plugins/ownership/security/authorizeproject/OwnershipAuthorizeProjectStrategy.java
            src/main/java/com/synopsys/arc/jenkins/plugins/ownership/security/rolestrategy/AbstractOwnershipRoleMacro.java
            src/main/java/com/synopsys/arc/jenkins/plugins/ownership/security/rolestrategy/CoOwnerRoleMacro.java
            src/main/java/com/synopsys/arc/jenkins/plugins/ownership/security/rolestrategy/CoOwnerRoleMacroNoSid.java
            src/main/java/com/synopsys/arc/jenkins/plugins/ownership/security/rolestrategy/OwnerRoleMacro.java
            src/main/java/com/synopsys/arc/jenkins/plugins/ownership/security/rolestrategy/OwnerRoleMacroNoSid.java
            src/main/java/com/synopsys/arc/jenkins/plugins/ownership/util/HTMLFormatter.java
            src/main/java/com/synopsys/arc/jenkins/plugins/ownership/util/UserStringFormatter.java
            src/main/java/com/synopsys/arc/jenkins/plugins/ownership/util/UserWrapper.java
            src/main/java/com/synopsys/arc/jenkins/plugins/ownership/util/ui/UserSelector.java
            src/main/java/org/jenkinsci/plugins/ownership/integrations/rolestrategy/macros/CurrentUserIsOwnerMacro.java
            src/main/java/org/jenkinsci/plugins/ownership/integrations/rolestrategy/macros/CurrentUserIsPrimaryOwnerMacro.java
            http://jenkins-ci.org/commit/ownership-plugin/f6830fe0f930badc7799d64877a110b4f5c79128
            Log:
            [FIXED JENKINS-48707] - Use User#getById() in the code

            User#get() is not effective from the performance PoV, because it tries to fetch users by full name. In all calls within the plugin it is not required, hence the update should achive some performance boost.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/com/synopsys/arc/jenkins/plugins/ownership/OwnershipDescription.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/OwnershipPlugin.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/jobs/JobOwnerHelper.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/security/authorizeproject/OwnershipAuthorizeProjectStrategy.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/security/rolestrategy/AbstractOwnershipRoleMacro.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/security/rolestrategy/CoOwnerRoleMacro.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/security/rolestrategy/CoOwnerRoleMacroNoSid.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/security/rolestrategy/OwnerRoleMacro.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/security/rolestrategy/OwnerRoleMacroNoSid.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/util/HTMLFormatter.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/util/UserStringFormatter.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/util/UserWrapper.java src/main/java/com/synopsys/arc/jenkins/plugins/ownership/util/ui/UserSelector.java src/main/java/org/jenkinsci/plugins/ownership/integrations/rolestrategy/macros/CurrentUserIsOwnerMacro.java src/main/java/org/jenkinsci/plugins/ownership/integrations/rolestrategy/macros/CurrentUserIsPrimaryOwnerMacro.java http://jenkins-ci.org/commit/ownership-plugin/f6830fe0f930badc7799d64877a110b4f5c79128 Log: [FIXED JENKINS-48707] - Use User#getById() in the code User#get() is not effective from the performance PoV, because it tries to fetch users by full name. In all calls within the plugin it is not required, hence the update should achive some performance boost.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Fixed in 0.11.0

            Show
            oleg_nenashev Oleg Nenashev added a comment - Fixed in 0.11.0

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: