improve performance of progress bar