WCF数据序列化性能问题

时间:2015-05-10 09:28:57

标签: performance wcf serialization

我有一个基于WCF的客户端服务应用程序。我使用EF与mysql db进行交互。我使用自己的实体在客户端和服务器之间进行数据传输。这是我的绑定模式:

<system.serviceModel>
<services>
  <service name="...BusinessService" behaviorConfiguration="SimpleServiceBehavior">
    <host>
      <baseAddresses>
        <add baseAddress="net.tcp://127.0.0.1:8001/....BusinessService/"/>
      </baseAddresses>
    </host>
    <endpoint address="CommonService" binding="netTcpBinding" bindingConfiguration="NetTCPBindingCommon" contract="....ICommonService"/>
    <endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange"/>
  </service>
</services>
<bindings>
  <netTcpBinding>
    <binding name="NetTCPBindingCommon" closeTimeout="00:11:00" openTimeout="00:11:00" 
                receiveTimeout="00:10:00" sendTimeout="00:01:00" 
                maxBufferSize="65536000" maxBufferPoolSize="52428800" maxReceivedMessageSize="65536000" 
                hostNameComparisonMode="StrongWildcard" transferMode="Buffered" transactionFlow="false" 
                transactionProtocol="OleTransactions">
      <readerQuotas maxDepth="32" maxStringContentLength="81920000" maxArrayLength="16384000" 
                maxBytesPerRead="4096" maxNameTableCharCount="1638400"/>
    </binding>
    .......

客户端服务数据传输期间的数据序列化和反序列化非常慢。我怎样才能让它更快? 什么是当今性能问题的最佳解决方案? Json.NET是我在某些论坛上发现的最佳解决方案吗?

0 个答案:

没有答案