You are given a performance problem in a web application. What steps would you take to diagnose and fix it?