I just made a 1-line change that improved my software's overall performance by 4x. That's a rare treat! #softwareengineering
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.)
@evan it's not "I fell off the jetway again" bad...
@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.