Improve performance of Bitmap generation