How to improve application performance and reduce latency