Application with many threads each calling Provider.getService()
The application had multiple threads calling java.security.Provider.getService repeatedly. Unfortunately since this method is synchronized this caused a bottleneck.
Generally speaking we end up calling Provider.getService() when attempting to find a crypto provider for a given operation (such as Cipher.getInstance()) In order to alleviate this problem applications should cache the result of the Cipher.getInstance() call per thread and reinitialise (Cipher.init(...)) the cached copy instead of calling Cipher.getInstance() again.
This allows the application to avoid calling Provider.getService() repeatedly.