RFR: 8273026: Slow LoginContext.login() on multi threading application

Larry-N github.com+75672469+larry-n at openjdk.java.net
Wed Sep 29 10:55:06 UTC 2021


This fix adds a cache of service provider classes to LoginContext (in particular, it's a cache of LoginModules classes). The approach helps to increase the performance of the LoginContext.login() method significantly, especially in a multi-threading environment. Service Loader is used for polling on Service Provider classes, without instantiating LoginModules object if Service Provider name doesn't match record in .config file. The set of service providers is cached for each Context Loader separately.
This code passed successfully tier1 and tier2 tests on mac os.

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

Commit messages:
 - 8273026: Slow LoginContext.login() on multi threading application

Changes: https://git.openjdk.java.net/jdk/pull/5748/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5748&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8273026
  Stats: 35 lines in 1 file changed: 23 ins; 3 del; 9 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5748.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5748/head:pull/5748

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



More information about the security-dev mailing list