Are static methods good for scalability?

后端 未结 8 531
故里飘歌
故里飘歌 2021-02-04 19:03

Does static methods and class are good for scalability ? I think so static class/method improves scalability of application and instance methods doesn\'t scales much. So is it g

8条回答
  •  有刺的猬
    2021-02-04 19:17

    I think you're barking up the wrong tree:

    In the real world, scalability (or the lack thereof) typically springs from appropriateness of one's algorithms and the efficiency of the operations made against data stores (think: good SQL queries).

    Things like whether a method is static or not (or the % of methods which are static) generally have nothing to do with the scalability of a system. You can certainly have a super scalable system which uses no static methods, or super scalable system which uses them exclusively.

提交回复
热议问题