Optimize adding config