[jdk15u-dev] RFR: 8268427: Improve AlgorithmConstraints:checkAlgorithm performance
Evgeny Astigeevich
github.com+42899633+eastig at openjdk.java.net
Fri Sep 10 21:09:24 UTC 2021
`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.
-------------
Commit messages:
- Backport 3b83bc1bc331d268987f56ea4f23124a7f6ee38b
Changes: https://git.openjdk.java.net/jdk15u-dev/pull/96/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk15u-dev&pr=96&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8268427
Stats: 112 lines in 4 files changed: 72 ins; 17 del; 23 mod
Patch: https://git.openjdk.java.net/jdk15u-dev/pull/96.diff
Fetch: git fetch https://git.openjdk.java.net/jdk15u-dev pull/96/head:pull/96
PR: https://git.openjdk.java.net/jdk15u-dev/pull/96
More information about the jdk-updates-dev
mailing list