Argument for Premature Optimisations as a Senior Engineer

Premature optimisation is the root of all evil

The problem

Let’s imagine… you create a component for a page your team is working on to display a small list of users.

User list component rendering User components ordered by name
User list component rendering User components ordered by a slow sorting algorithm

Solution

In a big team with rapidly evolving requirements as a senior engineer sometimes you need to use forward thinking and apply premature optimisations. This doesn’t mean over engineer everything, but take a moment to think what good small optimisations you can make to best set up the component you’re working on for future development.

User list component rendering User components ordered by name and memonized

Generally applicable

This type of beneficial premature optimisation isn’t just relevant to React, the idea of setting up good foundations to avoid performance issues can be aplied to everything from CSS to architecture.

Warning

Don’t spend hours working on adding nano second optimisations to all your code, just focus on the big, easy wins. It’s about balancing the time it takes to do the premature optimisation over the time it could save in the future.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Dillon Erhardt

Dillon Erhardt

Payments Lead Engineer @ Comma. I talk about process, architecture and security. https://dillonerhardt.com