Search code examples
c#asp.netazureblobstorage

ASP.NET page is responding slow at function


I have created a ASPX page to view images... I had made a list who is carrying all URI's of the images in the windows azure blobstorage. This one is invisible to store data temporary.

I also have a visible list where the uri's are "regexed" (with the Rexex function) for the user with only the name of the file.

the next step is, if the selected index from my listbox(lbTimeList) is changed, get the new image using the URI in the uriList.

signature = the SAS key that I have retieved from the webservice.

and I do that this way:

    protected void lbTimeList_SelectedIndexChanged(object sender, EventArgs e)
    {
        imageScreen.ImageUrl = uriList.Items[lbTimeList.SelectedIndex] + signature.Text;
    }

If the uriList is filled up to more than 3000 items, it took a really long time to get the image on this way...

You can check it out on: the application online to see the result of the long responding time..

Is there an alternative way to get the specific image from the Azure Blob storage with less responding time?


Solution

  • You are posting a lot of data back and forth from server to client and back again. On each selection in your lbTimeList a whole roundtrip is made that is very time consuming since you're passing lots of data back and forth.

    You could pass the text for the lbTimeList and the Urls as Key-Value-Pairs to the client once. And then use some client side code (jScript, ...) to load the proper image on a new selection in the list.