Sonoma Partners Microsoft CRM and Salesforce.com Blog

Increase your Performance by 600% with ExecuteMultipleRequest in Dynamics CRM Update Rollup 12

I took to the latest CRM 2011 SDK to see for myself how much the new ExecuteMultipleRequest actually improves performance.  It is indeed a huge optimization especially when loading thousands of records into your CRM environment.

For my test, I am creating 500 records using only CreateRequests and another test creating 500 records with one ExecuteMultipleRequest.  I am also using CRM Online for this test and I used the CRM Online diag tool (https://orgurl/tools/diagnostics/diag.aspx) to find my latency to be 61ms.

image

Here is the first test.  A method that loops 500 times, executing the CreateRequest for each loop.

image   
 

Now for the next test.  A method that loops 500 times creating a CreateRequest for each loop but only adding them to the Requests collection of the ExecuteMultipleRequest, which gets executed at the end of the method.

image 
 

Then I used Stopwatch to display the time elapsed for each test.

image 


As you can see below, the ExecuteMultipleRequest is a huge performance increase for CRM Online as it takes 1 minute and 31 seconds when individually creating 500 records and just 14 seconds when batching them together with the ExecuteMultipleRequest. This represents a 600% increase of performance when using ExecuteMultipleRequest! Your mileage may vary from these results, but you'll definitely see a big performance improvement no matter what...so make sure you take advantage of this right away!

image

For more information and examples on using the ExecuteMultipleRequest, click here.

Topics: Microsoft Dynamics CRM Microsoft Dynamics CRM 2011