|
Duplicate :
|
Historically toolkit a class switches off JIT compilation. It is necessary to check why we do it, and how performance is affected.
See java.awt.Toolki.java
public static synchronized Toolkit getDefaultToolkit() {
........................
// We disable the JIT during toolkit initialization. This
// tends to touch lots of classes that aren't needed again
// later and therefore JITing is counter-productiive.
java.lang.Compiler.disable();
.......................
// Make sure to always re-enable the JIT.
java.lang.Compiler.enable();