Batch Uploading Huge Sets of Images to Azure Blob Storage

前端 未结 6 1670
抹茶落季
抹茶落季 2021-02-06 01:08

I have about 110,000 images of various formats (jpg, png and gif) and sizes (2-40KB) stored locally on my hard drive. I need to upload them to Azure Blob Storage. While doing th

6条回答
  •  抹茶落季
    2021-02-06 01:31

    If the parallel method takes 5 times more to upload than the serial one, then you either

    • have awful bandwidth
    • have a very slow computer
    • do something wrong

    My command-line util gets quite a boost when running in parallel even though I don't use memory streams nor any other nifty stuff like that, I simply generate a string array of the filenames, then upload them with Parallel.ForEach.

    Additionally, the Properties.ContentType call probably sets you back quite a bit. Personally I never use them and I guess they shouldn't even matter unless you want to view them right in the browser via direct URLs.

提交回复
热议问题