Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speed up parallelized SFTP reads when read size goes beyond end of file
This commit speeds up SFTP read calls when the requested read size is much larger than the size of the file. Instead of continuing to read past the end, the parallel read algorithm now stops issuing new read requests as soon as an earlier read completes with an EOF error. While calling read() with no length is still the best option if you want to read a whole file, this optimization may be helpful in some cases. Thanks go to Maximilian Knespel for reporting this issue and doing performance measurements on the code before and after the change!
- Loading branch information