Introduction
You discovered a part of the system that could be much more performant.
You assumed optimizing this part of the system would have a great effect.
You managed to make the part 11 times faster!!
You made a pull request, excited to share it with the team.
But, wait?
A Senior engineer comes in. They leave a comment and don’t seem too excited.
Have you measured the impact of this optimization on the system in use, to see the effect it has on customers?
You spent 4 hours to make this part of the system 11 times faster, will it all go to waste?
Ambdahl’s Law
Software engineering always goes back to customers.
It’s important to not do things blindly.
Making a small part of the system faster may not have an overall effect on the system. It’s easy to fall into traps when focusing on performance optimizations.
Make sure your time is spent wisely as a developer.
If you want to optimize things for performance, make sure to measure first. You can measure the specific part of the system if you wish.
However, it’s more important to measure the whole application in use to see the performance issues from the perspective of the customers.
Absolutely! There's no point optimising in one area if there's a bottleneck up/downstream, thanks for sharing!
I really like that this puts a small change into the context of the overall application. Great point!