开发者

How to find out slow places in a WCF service

We have a standart WCF service for serving clients. It's a regular service with nothing special. There is a task for 开发者_如何学编程me to speed up the service. How can I do a monitoring of service slowness? I pretty sure there is the some tools for detecting bottlenecks in any program. I tried to use embed Visual Studio 2010 profiling tool but it's seems so complicated and not obvious for me so I have posted my question here.


In your service you could add some properties like StartTime, EndTime that are set at the entry/exit to your Method and transfered back in the object that your are delivering from your WCF and check that the service is actually taking a long time.

I was recently investigating a "slow" WCF that I'd written that was hosted at our provider, and it turned out to be that the methods themselves were lightning fast (using the above), but the initial time for startup of the service varied from 20sec - 2:10 because of some configuration option (that was not available through their remote management tools). Upon contacting the provider, the initial startup (when it has unloaded) reduced to under 3seconds. So you need to check where the slowpoint is.


I've used WCF Storm in the past to profile and help solve performance issues with WCF services.

You can get a trial version for 15 days or single license for around $100, but it will really help you diagnose your code.

Also check out this question "How to get started with WCF Performance profiling" for some more tips on profiling your services

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜