Jag har haft förmånen att få köra en bunt med WCF dragningar under den sista tiden. En fråga som nästan alltid kommer upp är performance. I fallet ASMX/WCF är marknadsföringssvaret att dra till med någon 37,4% gissning baserat på ett helt rent schema och hur mycket snabbare en DataContract serializer är än en XMLSerializer. Jag känner mig lite tafflig när jag svarar så... Verkligheten brukar vara lite mer komplex... Hur förhåller sig ASMX till WCF till Enterprise Services, IIS hostad under Basic Profile, med transport security, WS-Sec och såvidare... Nu har vi publicerat WCF Performance Comparison som svarar på frågan mycket bättre än jag någonsin gjort... Kolla in den här!

För er som inte orkar läsa den kommer här sammanfattningen:

When migrating distributed applications written with ASP.NET Web Services, WSE, .NET Enterprise Services and .NET Remoting to WCF, the performance is at least comparable to the other existing Microsoft distributed communication technologies. In most cases, the performance is significantly better for WCF over the other existing technologies. Another important characteristic of WCF is that the throughput performance is inherently scalable from a uni processor to quad processor.

To summarize the results, WCF is 25%—50% faster than ASP.NET Web Services, and approximately 25% faster than .NET Remoting. Comparison with .NET Enterprise Service is load dependant, as in one case WCF is nearly 100% faster but in another scenario it is nearly 25% slower. For WSE 2.0/3.0 implementations, migrating them to WCF will obviously provide the most significant performance gains of almost 4x.

Fridens liljor!
/Micke