Bold of you to assume this is a quick fix. How many software projects have you worked on that went from a buggy poorly optimized mess into a streamlined efficient system? I can think of exactly 0 from personal experience, all the ones I’ve worked on that were performant at the end had that in mind from their inception.