RFR: 8285398: Cache the results of constraint checks

Xue-Lei Andrew Fan xuelei at openjdk.java.net
Mon Apr 25 14:36:26 UTC 2022


On Mon, 25 Apr 2022 13:59:44 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:

>> FWIW: I wouldn't expect `SoftReference` (as opposed to `WeakReference`) to be eagerly cleaned.
>
> `SoftReference`s are guaranteed to survive one GC after use; beyond that their lifespan is determined by `SoftRefLRUPolicyMSPerMB` and the amount of memory available.

> With all the above in mind I decided not to use `sun.security.util.Cache` here

I was not meant to use Cache and timeout for this update.

SoftReference and  this patch should work good in larger memory boxes.  Performance improvement sometimes is a trade-off game between memory and CPU. Did you have a chance to check the performance in the limited memory circumstance?  like '-mx64M".

-------------

PR: https://git.openjdk.java.net/jdk/pull/8349



More information about the security-dev mailing list