Reputation: 49
This is a windows form application. I am using stop watch to measure the time of this operation:
HttpResponseMessage response = await httpClient.PostAsync(EndPoint, stringContent);
It comes out to be 600-700 ms. The latency to the web service is ~250 ms. I checked with fiddler and the request is taking <300 ms. So my question is why is there an extra 300-400 ms?
Upvotes: 2
Views: 914
Reputation: 24449
You have to take the round-trip into account. Your code has 2 parts:
So your request is still taking ~300ms, but so is the response and that's why the whole thing is taking about 2x your latency.
Upvotes: 1