Unlocking Efficiency: Exploring the Power of the Flyweight Pattern