Optimized the speed of auto add feature.