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

SidACL._hasPermission does too much object construction

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • 1.467

      "Handling GET /.../view/.../view/.../view/.../ : ...
         java.lang.Thread.State: RUNNABLE
      	at java.util.Arrays.copyOfRange(Arrays.java:3209)
      	at java.lang.String.<init>(String.java:215)
      	at java.lang.StringBuilder.toString(StringBuilder.java:430)
      	at java.lang.Object.toString(Object.java:219)
      	at org.acegisecurity.acls.sid.PrincipalSid.<init>(PrincipalSid.java:47)
      	at hudson.security.SidACL._hasPermission(SidACL.java:69)
      	at hudson.security.SidACL.hasPermission(SidACL.java:51)
      	at hudson.security.ACL.hasPermission(ACL.java:65)
      	at hudson.model.AbstractItem.hasPermission(AbstractItem.java:448)
      	at jenkins.model.Jenkins.getItems(Jenkins.java:1289)
      	at jenkins.model.Jenkins.getItems(Jenkins.java:301)
      	at hudson.model.ListView.getItems(ListView.java:164)
      	at hudson.model.ListView.getItems(ListView.java:56)
      	at hudson.plugins.nested_view.NestedView.getWorstResult(NestedView.java:178)
      

      _hasPermission constructs new PrincipalSid and GrantedAuthoritySid instances for each call, which is inefficient if it is being called repeatedly (as in this case). May be worth keeping a cache of these Sid instances keyed by Authentication.

            Unassigned Unassigned
            jglick Jesse Glick
            Votes:
            6 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: