I have an API of EMC using which my application upload images to cloud storage. The application uploads minimum 5000 images of 3kb size at a time.
It takes approximate 1.30 sec/image to upload on cloud server. So uploading 5000 images takes a long time to process.
Could you please guide to reduce the time to upload the images, so that it can process faster? Or Is there a way to upload multiple images using EsuRestApi?
We are using EsuApiLib dll and the application is build up in C# .Net 2005.
Below is the code snippet which we use to upload images to cloud storage.
------------------------- Start of code ------------------------
string filename = frmpath + "\\" + actimgpath;
string[] imgarr = imagename.Split(' ');
string imgn = imgarr[0].ToString();
FileInfo f = new FileInfo(filename);
long length = f.Length;
EsuRestApi cloudRest = new EsuRestApi(host, post, uid, sharedSecret);
Thanks for your response. Yes i did tried using multiple threads the time has reduced but still not the way we wanted like while using single thread it takes 1.5 seconds and using multiple thread it uploads around 2 images in the same time but uploading 5k images still takes a long time. Is there a way I can do batch upload? Or do you have any idea where the process works more faster.
rbala1
1 Rookie
•
222 Posts
362
0
Posted October 17th, 2012 06:00
Have you considered using multiple threads to create objects in parallel?