I have a similar problem and search.
We use the applet in Firefox. Current testing versions:
- Firefox: 46.0.1
- Java: jre1.8.0_51 (32bit)
I used JFR (Java Flight Recorder) and Oracle Mission Control to analyze a long freeze (about 5 seconds) when starting our user interface.
So far, I have found that the Permissions.implies() method takes a very long time for an unknown reason.
My analysis showed 2 long blocked stacks for 2 different threads, which both were long (about 2 s and 4 s) in this method.
Here is one call stack allocated by JMC: (for reference: 4.340.000.123ns = 4.34s)
Stack Trace Count Duration (ns) java.security.Permissions.implies(Permission) 1 4.340.000.123 sun.security.provider.PolicyFile.implies(ProtectionDomain, Permission) 1 4.340.000.123 java.security.ProtectionDomain.implies(Permission) 1 4.340.000.123 java.security.AccessControlContext.checkPermission(Permission) 1 4.340.000.123 java.security.AccessController.checkPermission(Permission) 1 4.340.000.123 java.lang.SecurityManager.checkPermission(Permission) 1 4.340.000.123 sun.plugin2.applet.AWTAppletSecurityManager.checkPermission(Permission) 1 4.340.000.123 java.lang.SecurityManager.hasAllPermission() 1 4.340.000.123 java.lang.SecurityManager.currentClassLoader() 1 4.340.000.123 sun.plugin2.applet.AWTAppletSecurityManager.getCurrentClassLoader() 1 4.340.000.123 sun.plugin2.applet.AWTAppletSecurityManager.getThreadGroup() 1 4.340.000.123 java.lang.Thread.init(ThreadGroup, Runnable, String, long, AccessControlContext) 1 4.340.000.123 java.lang.Thread.init(ThreadGroup, Runnable, String, long) 1 4.340.000.123 java.lang.Thread.<init>(String) 1 4.340.000.123 MyClass2.<init>() 1 4.340.000.123 MyClass.treatNew(Protocol) 1 4.340.000.123 MyClass.treatNewDecode(String, int) 1 4.340.000.123 MyClass.run() 1 4.340.000.123 java.lang.Thread.run() 1 4.340.000.123
Frederic leitenberger
source share