Describe a time you had to optimize a slow-performing API endpoint. What steps did you take to identify and resolve the bottleneck?