[jdk17u] RFR: 8268427: Improve AlgorithmConstraints:checkAlgorithm performance
Evgeny Astigeevich
github.com+42899633+eastig at openjdk.java.net
Thu Aug 5 18:51:07 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.
-------------
Commit messages:
- Backport 3b83bc1bc331d268987f56ea4f23124a7f6ee38b
Changes: https://git.openjdk.java.net/jdk17u/pull/10/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk17u&pr=10&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/jdk17u/pull/10.diff
Fetch: git fetch https://git.openjdk.java.net/jdk17u pull/10/head:pull/10
PR: https://git.openjdk.java.net/jdk17u/pull/10
More information about the jdk-updates-dev
mailing list