0

Currently using Microsoft.Azure.Storage.DataMovement library to download files > 10GB. Discovered that DownloadToFileParallelAsync was the fastest for me without having to use Azcopy. The library works great, and is fairly fast, but there's no way to get any progress info from it.

Thing's I've tried:

1.) using OperationContext to grab sends/receives, but they don't seem to be consistent.
2.) using DownloadRangeToStreamAsync with multiple threads to download attached to a progresshandler (not as fast)
3.) using FileWatcher to try to track file size changes during download with, but this wont work because it seems that DownloadToFileParallelAsync reserves the entire filesize on the disk so the size wont change.

Question, is there any other way to track progress?

Jon
  • 55
  • 6

1 Answers1

0

According to Microsoft document DownloadToFileParallelAsync -

Initiates an asynchronous operation to download the contents of a blob to a file by making parallel requests.

But currently there is no any other option to track the progress while using the DownloadToFileParallelAsync to download large files. It also does not offer Progress parameter like in DownloadToFileAsync, which can be used to get the progress of the download.

For now you can use DownloadRangeToStreamAsync as an workaround to solve the problem of tracking the download progress. Use the DownloadRangeToStreamAsync to break the large blob file into smaller chunks and then you can combine them at the client end. Check this answer by @PhullivanCuriious for more understanding. Although it is a little slower when compared with DownloadToFileParallelAsync, in which multiple 'slices' of the file are downloaded in parallel (at the same time).

SauravDas-MT
  • 1,224
  • 1
  • 4
  • 10