JDK-8055753 : Use ConcurrentHashMap to map ProtectionDomain to PermissionCollection
  • Type: Enhancement
  • Component: security-libs
  • Sub-Component: java.security
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-08-21
  • Updated: 2017-12-14
  • Resolved: 2015-05-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b66Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
The current implementation uses a Collections.synchronizedMap. Replacing that with a ConcurrentHashMap (with additional code to remove weak keys) increases the throughput of the Policy.implies method by approximately 3x. 
Comments
jmh results on a 4 CPU system with 8 threads: JDK 1.8.0_20: Benchmark Mode Samples Score Score error Units b.j.s.Policy_Implies.implies thrpt 200 9075912.941 95499.388 ops/s JDK 9 with patch: Benchmark Mode Samples Score Score error Units b.j.s.Policy_Implies.implies thrpt 200 23138796.071 373972.133 ops/s (See attached PerfChart.pdf for latest results)
15-05-2015

Attached is a chart comparing the performance before and after the fix with various numbers of threads. The system under test was Intel�� Core��� i5-2520M CPU @ 2.50GHz �� 4 running Ubuntu 14.04 LTS
15-05-2015

jmh benchmark
22-08-2014