Do I always have to think about performance?

后端 未结 21 722
小蘑菇
小蘑菇 2021-02-04 04:16

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

21条回答
  •  说谎
    说谎 (楼主)
    2021-02-04 04:31

    You want to think about performance regarding a particular issue as often as you might have to deal with performance issues on each issue one day.

    Meaning -- if it isn't going to get a ton of use, worry accordingly. Don't be incredibly lazy or inefficient, and don't over obsess in getting algorithmic nirvana each time. It's often best to code simplest and make it faster/optimized as needs arise. In the meantime simple code can be worked on by any developer and it's something worth considering.

    If you see it's importance increasing, now you know to think about it some more as it will come to bite you in the rear.

    As developers we have an issue of wanting a perfect v1.0. A working v1.0 is soemthing that works, not perfect for every situation the future may ever bring.

    A good example for me was when I started playing with databases many years ago. I didn't know what additional indexes were or the great performance boosts they give when queries unimaginably slow down.

    We can't predict every problem. I try to do good design, and let problems fight for my attention.

    Hope something was of use.

提交回复
热议问题