optimize the improvement of preview.