improve performance of renderer