I'm requesting from a web API information about 20,000 people that I need to update continuously at lightning speed (the web server doesn't throttle the number of requests). I can request an update on 20 people at a time (it's the maximum allowed per request) so i loop the List of people and ask the server info on groups of 20 just like this:Public Sub GetInformation()    Do        For Each Person In ListOfPerson            RequestList.Add Person            If RequestList.Count = 20 Then RequestToWebServer(RequestList): RequestList.Clear        Next    LoopEnd SubPublic RequestToWebServer(ResquestList as List(Of Person))    'Code to ask the web server the info'    'Then code to process the response'    For Each Person In ResquestList        If Person.Status = Old then RequestServerForMoreDetails    NextEnd SubThis could be very slow because a request could stall and everything just stops waiting for that request to be completed or timed out. So my solution is to fire a thread for each request:Public Sub GetInformation()    Do        For Each Person In ListOfPerson            RequestList.Add Person            If RequestList.Count = 20 Then ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf RequestToWebServer), RequestList) : RequestList.Clear        Next    LoopEnd SubI don't know if this is the right way to tackle the problem, worse, I have a second problem. If a Person has a status of Old (status is updated when i ask the web API for information) then I have to make an extra web request and I don't want to slow down the process of the others in the list, so I fire them in a thread also like this:Public RequestToWebServer(ResquestList as List(Of Person))    'Code to ask the web server the info'    For Each Person In ResquestList        If Person.Status = Old then ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf RequestServerForMoreDetails), Person)    NextEnd SubThis creates a lot of threads, and from what I heard it's usually not a good practice. Is there a better way to do this or am I in the right track?
Requesting information about people from a web API
performance;multithreading;vb.net;api