I just made a 1-line change that improved my software's overall performance by 4x. That's a rare treat! #softwareengineering
I would be prouder if I weren't the person who put that 1 line into the code in the first place. This is kind of like patting yourself on the back for improving your car's speed after driving around with the parking brake on for a few hours and finally releasing it.
@evan it's not "I fell off the jetway again" bad...
For anyone who cares: I had some digital signing code that I had built bottom-up, and I'd left the conversion from PEM data to a native key structure too far down the stack. It was getting called hundreds of times per minute. I didn't really give it a big thought, until I realized my program was CPU bound, and when I profiled it, the function with this call in it was running 67% of the time. So I moved the PEM-to-key call up a couple of levels, cached it, and got a 4x improvement in performance.
@evan
I think most programmers have been in that position before where their past self unintentionally made a performance issue blunder. I always try to be as forgiving of my past self as I would be for someone else who made an unintentional mistake.
(But it's hard because I'm my own hardest critic.)
@roytoo but it's great when you fix it and suddenly everything is fast!
@evan “why are you carrying that heavy anvil around in the desert?” — “that’s because I’m afraid of the lions. When I see a lion, I will immediately drop it and that lets me run much faster!”
@evan
Glad you found and made the fix. It is such a delight when fixes like that can be done.