Hi all
We have some translation plugins triggering on Retrieve and RetrieveMultiple, as detailed here by superb Scott Durow (https://www.develop1.net/public/post/2013/01/05/Multi-Language-Lookups). Having recently upgraded to v9 and more recently v9.1 we're experiencing issues with plugins not registered on particular events event firing.
To explain the issue let's take the following console app:
using Microsoft.Xrm.Sdk; using Microsoft.Xrm.Sdk.Query; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ICSCEConsole { class UpdateTesting { IOrganizationService _service; public UpdateTesting(IOrganizationService service) { this._service = service; } public void updateRecords() { // Instantiate QueryExpression QEquotedetail var QEquotedetail = new QueryExpression("quotedetail"); QEquotedetail.TopCount = 100; // Add columns to QEquotedetail.ColumnSet QEquotedetail.ColumnSet.AddColumns("description"); // Define filter QEquotedetail.Criteria QEquotedetail.Criteria.AddCondition("createdon", ConditionOperator.Today); var results = _service.RetrieveMultiple(QEquotedetail).Entities; Console.WriteLine("Retrieve {0} records at {1}", results.Count, DateTime.Now); foreach(Entity quotedetail in results) { Entity qd = new Entity("quotedetail"); qd.Id = quotedetail.Id; Console.WriteLine("Updating qd at: {0}", DateTime.Now); _service.Update(qd); Console.WriteLine("Finished qd account at: {0}", DateTime.Now); } } } }
As you can see I'm simply performing an empty update against any quotedetail records created on today. Against 8.2 and 80 records this takes in the region of 6 seconds and generates a single plugin trace log against RetrieveMultiple of quotedetail, as expected.
When I run this against v9 updating a similar number of records takes over 8 minutes and generates almost 10,000 plugin trace logs for the following:
primaryentity |
messagename |
productpricelevel |
RetrieveMultiple |
product |
Retrieve |
product |
Retrieve |
quote |
Retrieve |
quotedetail |
RetrieveMultiple |
quotedetail |
Retrieve |
As a result plugin performance in v9 is outrageous with various timeout issues.
I've opened a ticket with Microsoft regarding this issue but in the meantime would be interested to hear if anybody else has experienced similar issues and managed to find a resolution?
Thanks in advance for any assistance anyone is able to provide.
Cheers!
Luke
*This post is locked for comments