-
Enhancement
-
Resolution: Fixed
-
P3
-
None
-
b69
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8098749 | emb-9 | Sean Mullan | P3 | Resolved | Fixed | team |
Currently, the code has several synchronized blocks around get/put operations to the HashMap. The policy provider caches a Permissions object per ProtectionDomain, so this can easily become a thread contention point when multiple threads are checking permissions.
My benchmark with 8 threads which tests the performance of implies against a Permissions object containing a collection of different Permission objects shows about a 2x throughput improvement of Permissions.implies after I made this change. Prior to my change, a profiler showed that Permissions.implies was blocked 72% of the time. Afterwards, 0 %.
My benchmark with 8 threads which tests the performance of implies against a Permissions object containing a collection of different Permission objects shows about a 2x throughput improvement of Permissions.implies after I made this change. Prior to my change, a profiler showed that Permissions.implies was blocked 72% of the time. Afterwards, 0 %.
- backported by
-
JDK-8098749 Store PermissionCollection entries in a ConcurrentHashMap instead of a HashMap in Permissions class
-
- Resolved
-
- relates to
-
JDK-8129575 Equal DelegationPermission instances may return different hash codes
-
- Closed
-
-
JDK-8062948 Implement and measure potential performance improvements
-
- Resolved
-