Dataverse: Create ServiceClient Strategy


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.


Article 8m

Login now to access my digest by 365.Training

Learn how my digest works
Features
  • Articles, blogs, podcasts, training, and videos
  • Quick read TL;DRs for each item
  • Advanced filtering to prioritize what you care about
  • Quick views to isolate what you are looking for right now
  • Save your favorite items
  • Share your favorites
  • Snooze items you want to revisit when you have more time