Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I always have to think about performance?

I come from a DBA world and performance has always been an obsession. I am turning to development and I always think about performance, constantly, all the time.

Reading on SO sometimes seems that performance does not matter. For instance for evangelists on hibernate (or any other ORM).

As a developer, when do I have to think about performance and when not?

like image 700
FerranB Avatar asked Jan 22 '09 23:01

FerranB


People also ask

What causes lack of performance?

breaches of work practices, procedures and rules — such as breaching occupational health and safety requirements, excessive absenteeism, theft, harassment of other employees, etc; and. employees' personal problems — usually 'off-the-job' issues that affect their performance at work.

Why do performance reviews make me nervous?

This anxiety may be a result of the ambiguity often associated with performance reviews—for instance, if a professional doesn't know what to expect from their supervisor's feedback, they may feel uncertain or nervous in anticipation of the review.

Should you always rate yourself high on performance review?

If you've exceeded expectations, go ahead and rate yourself high. List the best of your achievements and play up the results.


2 Answers

Generally speaking, obsessing about performance or optimization is the route to much evil in software development. Usually, only about 5% (or less!) of your code has any impact on the performance of the overall system. Your primary goals, first, as a software developer on most projects is getting to correct and reliable functionality and also of course maintainability of the system. Then, once implemented and working correctly, you evaluate performance, find out where the bottlenecks are, and optimize them accordingly to meet your overall goals.

One Caveat: Doing O(n) type evaluations of approaches you take to things are reasonable things to consider in advance as part of the original system design and algorithm selection, etc. just to feel confident the performance will be "in the ball park". But beyond that, most attempts to optimize things in advance of actually measuring where the bottlenecks are will result in optimizing things that don't matter and usually make things less maintainable, harder to understand, etc.

like image 139
Tall Jeff Avatar answered Sep 20 '22 12:09

Tall Jeff


The Knuth quote ("We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil") probably applies.

When you drive your car, do you constantly and consciously check how close your car is to the curb? If you have enough experience driving a car you learn to know where its edges are and roughly how to drive and park it without hitting something close by.

The analogous kind of intuition/experience for programming performance is important to gain through trial/error and questions, but you shouldn't have to spend your time constantly double-checking yourself.

like image 26
Jason S Avatar answered Sep 16 '22 12:09

Jason S