Performance optimizations that avoid unnecessary DB operations.