RealProxy.PrivateInvoke takes longer time to execute on Win7/2008 machines when compared to WinXP/2003 machines.

مؤمّن RealProxy.PrivateInvoke takes longer time to execute on Win7/2008 machines when compared to WinXP/2003 machines.

  • Friday, May 11, 2012 11:40 AM
     
     

    To simply the problem i am facing..

    1. There is a WCF service (with duplex communcation) thats running on the machine

    2. On the same / different machine, there is a windows FORM based client that uses/communicates with the above service.

    3. The client makes a simple call to the service using the standard proxy.Foo() method.

    the above call takes more time when the client and service is running on win7/2008 machine when compared to the client and service running on XP/2003 machine. When we profiled the client application for performance using Ants Perf tool, we observed that the call traces to RealProxy.PrivateInvoke taking atleast 12 sec more on Win7/2008 machine than the same call on WinXP/2003 machine.

    See the below screen shot for the RealProxy.PrivateInvoke call on Win2008 machine (the client and service were both on the same win2008 machine)

    In our code we were creating a new TCPIP channel every time we call a method on the proxy. So we tried to refactor the code to create the channel only once and reuse it aslong as the client was alive. We expected this might improve the performance of the client on Win2008 machine but it did not and on the contrary it increased the time by another 10 sec.

    Request any one of you to let me know how to analyze whats causing the perf issue here.

    Thanks

    Vamsee