MS CRM 4.0 SDK - request bootstrap / accelerated loading of .NET applications

I am using the C # .NET SDK for MS CRM 4.0. In particular, I use the XRM SDK interface.

When I run my client application, the first request (for example, getting all crm system users) has an overhead of about 5 seconds . Overhead occurs before anything is sent through the network (observed in wirehark). Therefore, I assume that the delay is due to some of the load on .NET loading.

I found several explanations at http://www.eggheadcafe.com/software/aspnet/31916049/the-initial-delay-when-using-the-crmservice-is-caused-by-two-things.aspx :

The initial delay when using CrmService is caused by two things. The first proxy class CrmService must be compiled (from IL to native) and serialization must be loaded. This requires a lot of processing and therefore time. This compilation only occurs when the first instance of the proxy crmservice is created in AppDomain.

Second, when the call is made on the server for the first time, the class and may need to be loaded.

This is normal behavior for the .NET platform. You can optimize the boot time for CrmService by creating a new service proxy using the WSDL tool and cleaning up any requests and objects that you are not using. The problem with doing this is that it is a lot of work.

, , -, , - -?

GAC - .

+3

Source: https://habr.com/ru/post/1775829/


All Articles