Term: cooking with gas
Example: (after thirty minutes of working hard and getting almost nothing done but then suddenly finding a way to do it efficiently) now we're cooking with gas
Definition: efficiently performing a task after a long period of inefficient performance or possibly failed attempts at the entire task or certain steps in the process