Design pattern for performance