6bfeb42563
Motivation: Calling JNI methods is pretty expensive, so we should only do if needed. Modifications: Lazy call methods if needed. Result: Better performance.