I just made a 1-line change that improved my software's overall performance by 4x. That's a rare treat! #softwareengineering
Conversation
Notices
-
Embed this notice
Evan Prodromou 🇨🇦🇺🇸🇬🇷🇵🇸 (evan@cosocial.ca)'s status on Monday, 22-Jun-2026 07:35:55 JST
Evan Prodromou 🇨🇦🇺🇸🇬🇷🇵🇸
-
Embed this notice
Evan Prodromou 🇨🇦🇺🇸🇬🇷🇵🇸 (evan@cosocial.ca)'s status on Monday, 22-Jun-2026 09:34:12 JST
Evan Prodromou 🇨🇦🇺🇸🇬🇷🇵🇸
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.
-
Embed this notice
Evan Prodromou 🇨🇦🇺🇸🇬🇷🇵🇸 (evan@cosocial.ca)'s status on Monday, 22-Jun-2026 10:00:02 JST
Evan Prodromou 🇨🇦🇺🇸🇬🇷🇵🇸
@j12t lol!
-
Embed this notice
Johannes Ernst (j12t@j12t.social)'s status on Monday, 22-Jun-2026 10:00:04 JST
Johannes Ernst
@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!”
-
Embed this notice
Evan Prodromou 🇨🇦🇺🇸🇬🇷🇵🇸 (evan@cosocial.ca)'s status on Monday, 22-Jun-2026 10:27:52 JST
Evan Prodromou 🇨🇦🇺🇸🇬🇷🇵🇸
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.
-
Embed this notice
John Francis 🇨🇦🦫🍁🫎 (johnefrancis@cosocial.ca)'s status on Monday, 22-Jun-2026 10:38:19 JST
John Francis 🇨🇦🦫🍁🫎
@evan it's not "I fell off the jetway again" bad...
-
Embed this notice
Evan Prodromou 🇨🇦🇺🇸🇬🇷🇵🇸 (evan@cosocial.ca)'s status on Monday, 22-Jun-2026 11:06:57 JST
Evan Prodromou 🇨🇦🇺🇸🇬🇷🇵🇸
@johnefrancis Well...
-
Embed this notice
Evan Prodromou 🇨🇦🇺🇸🇬🇷🇵🇸 (evan@cosocial.ca)'s status on Monday, 22-Jun-2026 13:50:40 JST
Evan Prodromou 🇨🇦🇺🇸🇬🇷🇵🇸
@roytoo but it's great when you fix it and suddenly everything is fast!
-
Embed this notice
Roy (roytoo@mstdn.social)'s status on Monday, 22-Jun-2026 13:50:42 JST
Roy
@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.)
-
Embed this notice