Skip to content

Conversation

@eastig
Copy link
Member

@eastig eastig commented Aug 5, 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.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8268427: Improve AlgorithmConstraints:checkAlgorithm performance

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk17u pull/10/head:pull/10
$ git checkout pull/10

Update a local copy of the PR:
$ git checkout pull/10
$ git pull https://git.openjdk.java.net/jdk17u pull/10/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10

View PR using the GUI difftool:
$ git pr show -t 10

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk17u/pull/10.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 5, 2021

👋 Welcome back eastig! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot changed the title Backport 3b83bc1bc331d268987f56ea4f23124a7f6ee38b 8268427: Improve AlgorithmConstraints:checkAlgorithm performance Aug 5, 2021
@openjdk
Copy link

openjdk bot commented Aug 5, 2021

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required labels Aug 5, 2021
@openjdk
Copy link

openjdk bot commented Aug 5, 2021

@eastig This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8268427: Improve AlgorithmConstraints:checkAlgorithm performance

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 1 new commit pushed to the master branch:

  • 02ea80a: 8269851: OperatingSystemMXBean getProcessCpuLoad reports incorrect process cpu usage in containers

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added ready Pull request is ready to be integrated rfr Pull request is ready for review labels Aug 5, 2021
@mlbridge
Copy link

mlbridge bot commented Aug 5, 2021

Webrevs

@eastig
Copy link
Member Author

eastig commented Aug 6, 2021

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Aug 6, 2021
@openjdk
Copy link

openjdk bot commented Aug 6, 2021

@eastig
Your change (at version 5397005) is now ready to be sponsored by a Committer.

@phohensee
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Aug 6, 2021

Going to push as commit 456735f.
Since your change was applied there has been 1 commit pushed to the master branch:

  • 02ea80a: 8269851: OperatingSystemMXBean getProcessCpuLoad reports incorrect process cpu usage in containers

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Aug 6, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Aug 6, 2021
@openjdk
Copy link

openjdk bot commented Aug 6, 2021

@phohensee @eastig Pushed as commit 456735f.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

2 participants