Improve performance of partial repaints