Improved EnhancerFactory performance