Creating a ServiceClient in Dynamics CRM is an expensive operation. In a benchmark test, almost half of the time was wasted on creating the ServiceClient. Previously, it was believed that one ServiceClient per scope was needed, but this blog post compares using a cache vs creating a new instance of ServiceClient per call. The benchmark results show that using a cache (Singleton) is much faster than creating a new ServiceClient each time. The comparison results are: 0.0106 ms for the cached ServiceClient vs 445.6186 ms for creating a new ServiceClient.
Login now to access my digest by 365.Training