RFR: 8055753: Use ConcurrentHashMap to map ProtectionDomain to PermissionCollection
sean.mullan at oracle.com
Fri May 15 17:01:31 UTC 2015
This is the first in a series of fixes that I will be sending out for
review for JEP 232 (Improve Secure Application Performance) .
This fix changes the ProtectionDomain (PD) cache from a synchronized
HashMap to a ConcurrentHashMap. This increases the throughput of the
Policy.implies method up to ~3x (when the PD is cached) as more threads
are added. The bug contains a performance chart with more details.
Since the previous code used a WeakHashMap, and there is no equivalent
WeakConcurrentHashMap, I have added some additional code to check for
and remove weak keys from the ConcurrentHashMap.
Finally, I had to undo the fix for JDK-8078989  in this fix. That fix
has some problems and is likely the cause of another regression we have
seen . I am still investigating that, but I will likely re-open that
bug before I push this fix back.
More information about the security-dev