Let's call it "using multithreading to get a large number of data methods." Assuming that our requirement is to get 10W orders through the Web service, my solution is to split into 10 threads per thread transmission 1W Order segment acquisition, specifically see the following flowchart and its description
1, flow chart
2, Process Description:
Thread 1 starts the request interface to obtain 1W data, when the data is successfully fetched, the interface is idle, at which point we start thread 2 to get the data, while thread 1 continues to perform the subsequent work of getting the data, and if you convert the data, the way I use it is to deserialize the XML using the predefined entity object format (this is said to be more efficient than iterating through XML or loading into a dataset, I haven't tested it, haha) stop thread 1 after inserting data into the data. Use this thread-looping approach to handle all threads reading data.