The code is fine and shouldn't be slow.
Where is this code running ? if it's in a web/worker role, make sure it's running from the same data-center as the blob storage : west-europe, north-america, ...
Question
I am using windows azure blob storage. My problem is that the blob access is taking long time. The code which i am using to access the blob is as follows :
public void GetBlob() // blob access
{
Container = BlobClient.GetContainerReference(ContainerName);
Blob = Container.GetBlobReference(BlobName);
try
{
Blob.FetchAttributes();
}
catch (StorageClientException)
{ Blob = null; } // blob not present
}
Please suggest if there is any scope for improvement in the code for faster performance ?
Solution
The code is fine and shouldn't be slow.
Where is this code running ? if it's in a web/worker role, make sure it's running from the same data-center as the blob storage : west-europe, north-america, ...