none
How do increase WCF Performance?

    Question

  • Hi All,

     

    How do increase the WCF start-up performance using XMLSerializer.

     

    thanks in advance.

     

     

    Wednesday, April 02, 2008 11:13 AM

Answers

All replies

  • Why not consider using DataContractSerializer?  I did not compare the performance between XMLSerializer and DataContractSerializer.  However, DataContractSerializer is the default serializer for WCF and, therefore, I presume that it performs better than the older XMLSerializer.

     

    Wednesday, April 02, 2008 11:43 AM
  •  

    Hi Pyeung !

     

    Actually i was going to transfer a Large Data through DataSet . By what way It will increase and it use ful ?

    is there any way to use DataContract Serializer ....

     

     

    Wednesday, April 02, 2008 12:51 PM
  •  

    Hi Sami  Sir!

     

    Please Refer this URL for XMl Serializer Performance http://seewinapp.blogspot.com/2005/09/xmlserializer-performance-issue.html

     

     

    Wednesday, April 02, 2008 12:52 PM
  • thanks sasi.

     

    Will check and update you soon.

     

    thanks

     

     

    Wednesday, April 02, 2008 1:22 PM
  •  

    I tried with the XMLSerializer, but got warning as given below.

     

    Command:

    Svcutil.ext /t:xmlserializer "C:\Inetpub\wwwroot\service\sampleservice.dll"

     

    Result:

    Generating xml serializer...

    Warning: Cannot generate xmlserializer for assembly file: C:\Inetput\wwwroot\service\sampleservice.dll\

    No service contract in the Assembly has an Operation with xmlSerializerOperation Behaviors.

     

     

     

    thanks in advance

     

    regards

     

    Wednesday, April 02, 2008 1:29 PM
  • Serialization and deserialization only helps in converting the data format.  I do not think it has real effect on transferring large data because data transmission occupies most of the time. If you are transferring large dataset via Http, you can consider compressing your data by using MTOM (Message Transmission Optimization Mechanism) Encoding (the default is Text Encoding).  If you are using Tcp, your message is defaulted to Binary Message Encoding (which is the most compact built-in format in WCF).

    Thursday, April 03, 2008 1:43 AM
  •  

    Hi Pyeung !

     

     I tried with Gzip compression but it wont increase the  Application performance. it consumes less than 2 seconds compared with dataset . by the way i am using WShttpbiningig with http Protocal but it does n't support to transfer as Stream. Is there Any other way to increase the WCF Srervice performance.

     

     

     thanks

     

    Thursday, April 03, 2008 5:34 AM
  • WSHttpBinding supports MTOM but does not support streaming.

    Friday, April 04, 2008 1:12 AM
  • When you say performance, what dfo you mean?  Do you mean messages processed per second, total throughput, or some other measure?

     

    WsHttpBinding doesn't support streaming due to the reliable messaging protocol (WS-RM), which requires that messages are buffered on either end - if you don't need this, then BasicHttpBinding or a custom binding might give you the performance you're looking for.

     

    -Mark

    Friday, April 04, 2008 11:31 PM
  • I mean total throughput. It takes more time to transmit data from server to client.

     

    Regards

     

    Wednesday, April 09, 2008 11:28 AM
  • Rather than generating the serialization code in runtime, you may use the approach described in the link below.

    http://msdn2.microsoft.com/en-us/library/aa751883.aspx

     

    For overall performance issues, refer to the link below. You may use performance analyzer to figure out what are the bottlenecks for your application.

    http://blogs.msdn.com/wenlong/archive/2007/12/04/profiling-wcf-wf-applications-with-vs-performance-profiler.aspx

    Wednesday, April 09, 2008 5:59 PM