Hello
I have recently been put in charge of a custom built ASP.Net system which uses CrmServiceClient to perform some work on 2 custom entities. Our CRM is on-prem in a VM. Sql server is on another VM.
These entities are rather simple, a simple hierarchy - parent->child one level - 1 to many relationship, nothing fancy, no plugins, no custom workflows, no events.
You could says that these entities are only used for data storage,. in CRM the parent entity has one standard main Information form and a view on it for a list of child entities.
Lately we've been experiencing a huge slowdown when trying to insert more than twenty rows at the time through _client.Create. I firsrt blamed the ASP.Net app and optimized the code,
but it made no difference. Then I asked a colleague to monitor server and the VMs for abnormal load when i execute insert operations and there was no notable increase in load. On CRM machine one CPU core of 8 was peaking at like 60 % and no memory spikes. Neither SQL server and its VM showed any signs of struggle.
So I'v changed the code again in ASP.Net app and instead of create each child row one by one, I ran with ExecuteMultiple request passing in about of three hundred child rows of data.
That , amazingly, did nothing at all... It takes approximately 5 minutes to insert 300 rows either via _client.Create or ExecuteMultiple. And what's more interesting it take about 5-6 minutes to delete them through CRM's own interface via parent entity form , clicking "Delete"...
Right now I am clueless...