Walk me through a time you had to optimize a piece of software that was failing to meet performance requirements.