improve performance of background drawing