Optimize the speed and performance