At this project we’re using the backward-compatible web services of Dynamics CRM 2011. We’re implementating a bulk-insert functionality and there is no way to implement this (supported) directly on database level. So we have to use the WCF interface or the web services.
Using the CSV upload mechanism and the mapping was not suitable in this case and will make the exception tracking more complex.
And now let’s focus on the main topic of this post, the performance. With the web services we got only the ability to insert 300 records per minute. In our case the bulk-insert operation will take hours. I come across this article on msdn http://msdn.microsoft.com/en-us/library/ff647682.aspx that describes some tips to boost the performance of web-services. The one that makes the big difference in performance in our case was the PreAuthenticate flag. Use this flag on the webservice client and the insert operation will go close to light speed: 8.500 records per minute! Very good for a web service operation.
When PreAuthenticate is true, the WWW-authenticate header is sent with all subsequent requests. This will boost the performance and remove the overhead of authentication requests on each web service call.
Be carefull that with this amount of requests the default dynamic range for the tcp-ip ports will not be enough. We have to extend the range of these ports. You’ll get a WebException on the client when this happens. For more information on this topic visit: http://support.microsoft.com/kb/929851/en-us
