Improving performance by only rendering needed frames