Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wrap cache reader in BufReader for speed. (#166)
Profiling reading from the cache in the download of a 1GB file showed that 48% of the time was spent in system read calls. This PR removes that bottleneck by simply wrapping the read calls in a BufReader. This eliminates that bottleneck and showed a 15-20% overall speed improvement restoring the 1GB file from cache (based on a few non-rigorous bash `time` runs).
- Loading branch information