A situation that programmers are all too familiar with. It happens again and again, you are sure you did what you had to do, there must be something wrong with the language or the code, it's lying! After much frustration you figure out that you were doing something silly that was causing the problem you were complaining about.
Here's an example that happened to me back in July that might be applicable to others. So I had been trying to optimise the render times of my publishing tool CLI. Something that was taking 5 mins started taking 45 mins. It was horrendous. But after much effort I got the rendering down to 12 seconds. I was very happy, it was so much faster than even what it was previously. But then it doubled to 24 seconds, and so I persevered, for hours and hours, testing everything I could think of. No matter what I did, it was double what it had been. And as I pushed forward things got even worse because the LLM that was helping started suggesting all sorts of crazy ideas, because we'd run out of all the normal things that could be affecting it. I eventually gave up.
After a break, I returned to my laptop, and thought, what the hell, I'll run it 1 more time, and wouldn't you know it, it rendered in 15 seconds! Well it turned out that I had been overdriving the hard drive by running it so much, and the system needs to run some cleanup tasks when you are creating then deleting thousands of files over and over, and that cleanup could never finish because I was creating and deleting more files by running the program over and over.
Letting the laptop alone for a while had given the background process enough time to finish it's activities, and so when I ran it on a fresh system with all the resources available, it was super quick.
Sometimes the best thing to do is nothing, allow the system to do it's thing.