Describe a time you had to optimize a piece of code that was causing significant performance bottlenecks for a B&A project.