Adding performance detection to turn off/on auto-compilation