SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We are using the imaging.asmx upload function to upload a VGA image and then use the file name to get the ID and update the properties of the image using an UpdateListItem call.

The time taken to upload the picture increases from 2 seconds to 16 seconds linearly, as the number of images in the library goes up from <1000 to 15000 or so.

Deleting pictures brings the time back to 2-3 secs.

The CPU profile shows 100% utilization during the upload call.

Even the Remove function takes 12 sec to delete a picture. We also used MS Access to delete which uses UpdateListItem and we could delete 1000 pics in 1 min using this call.

Is there an alternate way of speeding up the picture upload?

share|improve this question

How are you calling the imaging web service? If it's client side it may be more an issue with the client system resources than the server. I'm assuming that your CPU profile is on the system calling the web service, as opposed to the server.

The issue with images and the web services is the sheer amount of data. With the lists web service, attachments have to be broken down and encoded into a binary string to be sent to the server. This process is very intense if you're running it client side. Your holdup is probably not the server dealing with the data, but rather the client system struggling to encode it all; especially if you're seeing CPU or memory spikes.

I had a previous requirement to bulk load ~5,000 documents into a document library. The average size was about 5mb, but some were as large as 30mb. We ran into issues with anything over 10mb or so hogging the resources on the client system. It took us about 2 hours to run the migration. Even a 640x480 image still contains a lot of data, and once you encode that out to binary it's a lot to process. For a web service, client side, I'd say your time's aren't that bad. If you can find a machine with more resources to run your migration tool on it'll probably help your cause a bit.

How is your application written? We found some performance gains by encoding multiple files at once and pushing them to the server in a chunk (say maybe 10 at a time), as opposed to doing it one for one. As James pointed out though, if you're end game is to attach them to a list item, I'd just use the Lists.AddAttachment operation.

share|improve this answer

Are you uploading the images to a List, and adding the images as attachments to a list item? you could use Lists.asmx instead, then (here's the documentation for Lists.AddAttachment):

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.