Improving animation performance