What can be done to speed up synchronous WCF calls?

后端 未结 2 1996
半阙折子戏
半阙折子戏 2021-01-19 14:52

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 slo

2条回答
  •  轮回少年
    2021-01-19 15:19

    Not a lot. You run the problem of making 100 http calls, that just takes time. You arelady do not blow it by generating a new client every time.... so, sorry.

    In general, this is a bad example (or: a good one showing bad practice). Services should always be coarse grained to avoid the call overhead. A service should have some "weight" in what it does, generally.

    A calculator may accept an array of operations, so all 100 calculations can be sent at once, for example.

    Keep that in mind when when designing your own interfaces.

提交回复
热议问题