In the current implementation, only provider PKCS11 register the services in the constructor. For other providers, they do not register the services in advance.
Thus, when getting a service from a particular provider, inside the getService() method in java.security.Provider.java, it looks up the serviceMap. As the services are not loaded before, the serviceMap is always null and the putService is never called.
As this getService() is a synchronized method, which causes performance regression when multiple threads are trying to get service.