Integrated: 8285398: Cache the results of constraint checks

Daniel Jeliński djelinski at openjdk.java.net
Tue Apr 26 05:59:04 UTC 2022


On Thu, 21 Apr 2022 19:58:39 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:

> Profiling the TLS handshakes using SSLHandshake benchmark shows that a large portion of time is spent in HandshakeContext initialization, specifically in DisabledAlgorithmConstraints class.
> 
> There are only a few instances of that class, and they are immutable. Caching the results should be a low-risk operation.
> 
> The cache is implemented as a softly reachable ConcurrentHashMap; this way it can be removed from memory after a period of inactivity. Under normal circumstances the cache holds no more than 100 algorithms.

This pull request has now been integrated.

Changeset: 00e9c96d
Author:    Daniel Jeliński <djelinski at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/00e9c96d51bec53d4ae8a07c9c98af2c62f3d290
Stats:     26 lines in 1 file changed: 23 ins; 1 del; 2 mod

8285398: Cache the results of constraint checks

Reviewed-by: coffeys, xuelei

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

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



More information about the security-dev mailing list