In my WebApi (.Net 4.6.2) I have an issue with one call that performs unexpectidly slow(~15sec). When I went to analyze it I found out that the code inside the call performs relatively fast( does db call & processing in < 200ms) and sends response back to the client.
I thought that serialization (I'm using JSON) takes a while to do. So i put a breakpoint into the GetObjectData()
method of the class that I'm trying to serialize. And it does its job in few milliseconds too.
After that if I let it run it still takes remaining time (around 14 seconds) to complete.(This time is pure wait on client side, no download happens)
How can i debug what happens after GetObjectData()
and identify the bottleneck?