Skip navigation

I have the unfortunate habit of spending quite a lot of time on each of the projects I undertake. Now in some ways this is good but it does mean that some of the things I see on the projects I am part of may just be isolated incidents.

One of the sayings I hear quite often is ‘don’t prematurely optimise’. Whilst I agree with this in general like everything taken to an extreme it can lead to some unwanted effects.

Taking the prematurely optimise but measure and and then optimise can mean that people stop writing efficient code and worse almost deliberately write inefficient code – it is easier to do several string manipulations one at a time than scan a string once. Sometimes this is fine but within the context of a text heavy high request rate web site these things can be a real bottleneck.

So during your next refactoring cycle – think about the performance of the code you are changing as well as how well it reads and fits in with the architecture. Not a lot of time but just stop and say is this code reasonably efficient.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.