More performance optimization for plugins