Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To download 267 MB files take 3 minutes #279

Open
cpatil7 opened this issue Jul 29, 2021 · 0 comments
Open

To download 267 MB files take 3 minutes #279

cpatil7 opened this issue Jul 29, 2021 · 0 comments

Comments

@cpatil7
Copy link

cpatil7 commented Jul 29, 2021

Which service(blob, file) does this issue concern?

File

Which version of the SDK was used?

2.0.4

On which platform were you using? (.Net Framework version or .Net Core version, and OS version)

.Net Core & Windows 10

How can the problem be reproduced? It'd be better if the code caused the problem can be shared.

Microsoft.Azure.Storage.File.CloudFileClient client = account.CreateCloudFileClient();

            //get File Share
            Microsoft.Azure.Storage.File.CloudFileShare cloudFileShare = client.GetShareReference("xxxxfileshare");

            //Microsoft.Azure.Storage.File.CloudFile destinationFile = 
            //get the related directory
            Microsoft.Azure.Storage.File.CloudFileDirectory rootDirectory = cloudFileShare.GetRootDirectoryReference();


            //get the file reference
            Microsoft.Azure.Storage.File.CloudFile file = rootDirectory.GetFileReference(fileName);

           
            //download file to local disk
            Stopwatch stopwatch2 = new Stopwatch();
            stopwatch2.Start();
            SingleTransferContext sharedTransferContext = new SingleTransferContext();
            DownloadOptions options = new DownloadOptions();
            options.DisableContentMD5Validation = true;
            await TransferManager.DownloadAsync(file, filePath, options, sharedTransferContext);
            
            stopwatch2.Stop();
            Console.WriteLine("Time elapsed: {0}", stopwatch2.Elapsed.TotalSeconds);

What problem was encountered?

for 267 MB file, it take ~ 3 minutes to download. Is there a way to optimize the code.

Have you found a mitigation/solution?

No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant