Speed up performance when working with large numbers of files