[jdk15u-dev] Integrated: 8268427: Improve AlgorithmConstraints:checkAlgorithm performance
Evgeny Astigeevich
github.com+42899633+eastig at openjdk.java.net
Mon Sep 13 14:45:17 UTC 2021
On Fri, 10 Sep 2021 21:00:39 GMT, Evgeny Astigeevich <github.com+42899633+eastig at openjdk.org> wrote:
> `sun.security.util.AbstractAlgorithmConstraints.checkAlgorithm()` uses linear search to check if an algorithm has been disabled. Its execution time is high in the most common case: a checked algorithm is not disabled.
>
> This backport replaces the list with an ordered set. This improves `AbstractAlgorithmConstraints.checkAlgorithm()` performance, especially for permitted algorithms.
>
> The patch applies cleanly. Tier1 and tier2 tests pass with the patch. No unexpected failures.
This pull request has now been integrated.
Changeset: 0bc58f9b
Author: Evgeny Astigeevich <eastig at amazon.com>
Committer: Yuri Nesterenko <yan at openjdk.org>
URL: https://git.openjdk.java.net/jdk15u-dev/commit/0bc58f9b2b4335c2d31107fa2f3e2e33d73d409d
Stats: 112 lines in 4 files changed: 72 ins; 17 del; 23 mod
8268427: Improve AlgorithmConstraints:checkAlgorithm performance
Backport-of: 3b83bc1bc331d268987f56ea4f23124a7f6ee38b
-------------
PR: https://git.openjdk.java.net/jdk15u-dev/pull/96
More information about the jdk-updates-dev
mailing list