What can be done to speed up synchronous WCF calls?

Posted by Dimitri C. on Stack Overflow See other posts from Stack Overflow or by Dimitri C.
Published on 2010-03-09T07:55:13Z Indexed on 2010/03/09 8:06 UTC
Read the original article Hit count: 344

Filed under:
|
|

My performance measurements of synchronous WCF calls from within a Silverlight application showed I can make 7 calls/s on a localhost connection, which is very slow. Can this be speeded up, or is this normal?

This is my test code:

const UInt32 nrCalls = 100;
ICalculator calculator = new CalculatorClient(); // took over from the MSDN calculator example
for (double i = 0; i < nrCalls; ++i)
{
    var call = calculator.BeginSubtract(i + 1, 1, null, null);
    call.AsyncWaitHandle.WaitOne();
    double result = calculator.EndSubtract(call);
}

Remarks:

  • CPU load is almost 0%. Apparently, the WCF module is waiting for something.
  • I tested this both on Firefox 3.6 and Internet Explorer 7.
  • I'm using Silverlight v3.0

© Stack Overflow or respective owner

Related posts about wcf

Related posts about Silverlight