15 Seconds for first REST Call

Oct 6, 2015 at 11:57 AM
We are trying to integrate Casablanca in a Service (windows Service)

The first REST call is always taking time. (Close to 15 seconds). Thought it could be due to dynamic linking. Later tried by creating a static library and included in the provider.

In both the cases (dynamic and Static linking), the first call is taking 15 seconds.

Any specific reasons for this? Any help would be helpful
Oct 6, 2015 at 11:26 PM
First: do you get the same behavior even with simple page requests like we have in our tutorials?

It might be a server-side issue. Try taking a network capture and comparing the times between the packets. If that's not the issue, there are some common accidents that can occur when working with tasks (especially over-using .wait() and .get()). These could result in excessive serialization and reduced performance.

Can you get a reduced repro for the problem?
Oct 7, 2015 at 6:06 AM

It is not a server side issue. When we use the other clients, the response time is in 200-400 milliseconds. We tested this with multiple clients.
Even with casablanca, only the first call is taking 15 seconds. The subsequent calls are processed in milli-seconds.

Need some more details on the wait() and get(), i didn't get the context completely here.

We are running a windows service. We are making the REST calls from this service. Would this make any difference?