Return to profile for Alain Schlesser

Object-Oriented Optimization Techniques

40 minute advanced seminar


Most of the optimization techniques I see in the WordPress space are about using if/else clause to branch the code somewhere and add special handling.

Apart from being a very stubborn approach that can produce counter-productive results, this also means that the code gets more and more complex, and the logic becomes so convoluted that it is difficult to make big changes without introducing bugs, as the logic is so difficult to reason about.

Object-oriented programming, if used correctly, opens up the code base for higher level optimizations that are completely transparent to the actual business logic. You can introduce lazy-loading, caching and other optimizations without corrupting your actual problem-solving code.

This session first discusses the main issues with branching code, and then demonstrates a few of the more common optimization techniques that can be used without compromising the elegance of the business logic.