Fixing performance issues with changing a sprite’s frame.