Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Commits on May 30, 2017

  1. [JENKINS-18377] Cache Role#hashCode to speed up RoleMap#getRolesHavin…

    …gPermission
    
    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)
    olivergondza committed May 30, 2017
    Copy the full SHA
    161c035 View commit details
    Browse the repository at this point in the history