On 05/19/2015 10:20 PM, Oracle wrote:
The code change looks fine.Some tiny suggestions on styles: Is it possible to move the definition of Key before key is assigned?
Sure. I will move it to the top of the class.
Some left braces ("{") are on new lines, looks inconsistent with others.
Ok, will fix.
Line 465, /* -> /**.
Will fix. Thanks, Sean
Thanks Max在 2015年5月16日,上午1:01,Sean Mullan <[email protected]> 写道: This is the first in a series of fixes that I will be sending out for review for JEP 232 (Improve Secure Application Performance) [1]. webrev: http://cr.openjdk.java.net/~mullan/webrevs/8055753/webrev.00/ bug: https://bugs.openjdk.java.net/browse/JDK-8055753 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 [2] in this fix. That fix has some problems and is likely the cause of another regression we have seen [3]. I am still investigating that, but I will likely re-open that bug before I push this fix back. Thanks, Sean [1] http://openjdk.java.net/jeps/232 [2] https://bugs.openjdk.java.net/browse/JDK-8078989 [3] https://bugs.openjdk.java.net/browse/JDK-8077418
