0
votes

I have an application which loads different blobs from the same container stored on Azure blob storage with the following code snippet

        var cloudStorageAccount = CloudStorageAccount.Parse(buildGraphRequest.AzureBlobConnectionString);
        var bolbClient = new CloudBlobClient(cloudStorageAccount.BlobEndpoint, cloudStorageAccount.Credentials);
        var container = bolbClient.GetContainerReference(buildGraphRequest.BlobContainerName);
        var blob = container.GetBlobReference(filename);

I'm not sure if there is any performance difference if I execute the code above everytime I want to get a hold of a blob, or I can initialize the container once and use the same container object every time.

The closest thing I can find is this post. Connection pooling on Azure Storage

1
You don't need to keep re-executing those initial setup calls. - David Makogon
@DavidMakogonThanks for the response. Do you know how significant the difference is in term of performance? - checai

1 Answers

0
votes

According to the information in the post you have mentioned, the Azure Blob Storage is essentially an HTTP connection which is Request/Response based, after sending response, it will be terminated.

But as @Gaurav Mantri said,

These statements do not make a network call. They just create an instance of these objects so there is no network latency related overhead when you create instances of these objects.

So I think it will be no network latency about performance, it will just waste some cycles creating objects.