Improve performance of large restore commands