Optimize CPU usage