Optimized a Java function & cut production CPU from >90% to 70%