Performance anti patterns

前端 未结 18 918
天涯浪人
天涯浪人 2021-02-05 19:29

I am currently working for a client who are petrified of changing lousy un-testable and un-maintainable code because of \"performance reasons\". It is clear t

18条回答
  •  广开言路
    2021-02-05 19:50

    Michael A Jackson gives two rules for optimizing performance:

    1. Don't do it.
    2. (experts only) Don't do it yet.

    If people are worried about performance, tell 'em to make it real - what is good performance and how do you test for it? Then if your code doesn't perform up to their standards, at least it's something the code writer and the application user agree on.

    If people are worried about non-performance costs of rewriting ossified code (for example, the time sink) then present your estimates and demonstrate that it can be done in the schedule. Assuming it can.

提交回复
热议问题