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 that there are many misconceptions running rife and reasons are not understood, but merely followed with blind faith.
One such anti-pattern I have come across is the need to mark as many classes as possible as sealed internal...
*RE-Edit: I see marking everything as sealed internal (in C#) as a premature optimisation.*
I am wondering what are some of the other performance anti-patterns people may be aware of or come across?
Poltergeist. A poltergeist is an anti-pattern involving a pointless class that is used to call methods of another class or simply adds an unnecessary layer of abstraction.
Anti-patterns are considered bad software design, and are usually ineffective or obscure fixes. They generally also add "technical debt" - which is code you have to come back and fix properly later.
A pattern is an idea of how to solve a problem of some class. An anti-pattern is an idea of how not to solve it because implementing that idea would result in bad design. An example: a "pattern" would be to use a function for code reuse, an "anti-pattern" would be to use copy-paste for the same.
A higher-level vocabulary simplifies communication between software practitioners and enables concise description of higher-level concepts. An AntiPattern is a literary form that describes a commonly occurring solution to a problem that generates decidedly negative consequences.
The biggest performance anti-pattern I have come across is:
Collecting performance data will show if a certain technique was successful or not. Not doing so will result in pretty useless activities, because someone has the "feeling" of increased performance when nothing at all has changed.
The elephant in the room: Focusing on implementation-level micro-optimization instead of on better algorithms.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With