2

I have a Az function using implementation similar to this https://github.com/FBoucher/AzUnzipEverything/blob/master/Unzipthis.cs I have BLOB trigger when a zip file is dropped. Az function Unzips it and copies the files to a new AZ blob location. I get zip files with thousands of files inside it, so the copy process takes a very long time using foreach loop. i tried using Parallel for each Async https://github.com/Dasync/AsyncEnumerable that only works when running locally, when deployed it does not seems to work at all, no errors nothing, but nothing happens.

I want to try this Durable functions instead like in example below where each file copy is done by a another activity function. This will help speed up the process by having separate task for copy job, but problem is how do i pass the file to be copied to another blob location in Activity function?

https://github.com/Azure/azure-functions-durable-extension/blob/master/samples/precompiled/BackupSiteContent.cs

Thinkara Kara
  • 227
  • 3
  • 9

1 Answers1

0

My suggestion is that after triggering the condition, first copy the .zip file directly to the new blob, and then decompress it. Because I think the direct decompression and transfer speed will be very slow, similar to copying data from a computer in a USB flash drive.

You can refer to this post to copy the .zip file. You also can see my code in github. When copy finished, you can find the file and unzip it. You can see rGiosa's answer in this post . It will help you.

Jason Pan
  • 15,263
  • 1
  • 14
  • 29