FULL PRODUCT VERSION :
java version " 1.7.0_13 "
Java(TM) SE Runtime Environment (build 1.7.0_13-b20)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Darwin mac-mini-2.fineline.local 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64
A DESCRIPTION OF THE PROBLEM :
SSLContext.createSSLEngine appears to be really slow on OS X with JDK 7. I was able to trace it down to the loading of the export restrictions in JceSecurity. The first time it executes the JarVerifier.verifyPolicySigned it is really slow.
I tested on linux and it does not exhibit this behavior and neither does the Apple JDK 6.
REGRESSION. Last worked in version 6u31
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the Test main method in the source code.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The execution should be under 500ms based on results from jdk 6 and linux with jdk 7.
ACTUAL -
The execution took 5236ms.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.net.ssl.SSLContext;
import java.security.NoSuchAlgorithmException;
public class Test {
public static void main(String[] args) throws NoSuchAlgorithmException {
long start = System.currentTimeMillis();
SSLContext.getDefault().createSSLEngine();
System.out.println((System.currentTimeMillis() - start));
}
}
---------- END SOURCE ----------