Concurrently downloading JSON data from remote service(s) Concurrently downloading JSON data from remote service(s) json json

Concurrently downloading JSON data from remote service(s)


As per this question there is a setting which controls how many simultaneous HTTP requests can be made. Also, you should be using the BeginGetResponse method on HttpWebRequest for concurrent downloading because it is less expensive than creating threads. Look here for examples.


Might be related to the concurrency mode of your service. Check http://msdn.microsoft.com/en-us/library/system.servicemodel.concurrencymode.aspx and make sure that the service is not single threaded.


The best answer to this question I ultimately came up with came from this link:

http://blogs.msdn.com/b/wenlong/archive/2010/02/11/why-are-wcf-responses-slow-and-setminthreads-does-not-work.aspx

Which applies if you are calling the same servive method repeatedly.

By tweaking ThreadPool.SetMinThreads() on both client and server I was able to get improved results.

However there are still alot of slowness issues with WCF and transferring over HTTP that I haven't really gotten to the bottom of.