locked
CRM2011: early binding vs late binding performance view point RRS feed

  • Question

  • Hi All,

    Is there any difference between earlybinding and latebinding in crm-2011 with respect to performance view point. If yes, please kinldy elaborate.

    Thanks in advance


    Thanks and Regards, Sravan KC.
    Wednesday, April 27, 2011 5:58 AM

Answers

  • Guys those answers really helped. We are using a blend of both early binding and late binding. Thanks a lot to all of you. Regrets for the delayed response


    Thanks and Regards, Sravan KC.
    Tuesday, May 24, 2011 11:50 AM

All replies

  • Hi sravan,

    from SDK:

    The key difference between early and late binding involves type conversion. While early binding provides compile-time checking of all types so that no implicit casts occur, late binding checks types only when the object is created or an action is performed on the type. The Entity class requires types to be explicitly specified to prevent implicit casts.

    The advantages to using early-bound entity classes is that all type references are checked at compile time. The compiled executable contains the code necessary to invoke the types’ properties, methods, and events.

     



    vishal swami

    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    http://msdynamics4you.blogspot.com
    Wednesday, April 27, 2011 2:30 PM
  • Can anyone answer that question from Performance perspective? We did use late binding for CRM 4.0 previously. Compare to early binding, it helps us a lot on solving memory leak issue. (PS. We have 370+ custom entities in our implementation). Thanks!
    MCSD.NET, MCDBA
    Thursday, May 5, 2011 6:16 AM
  • Hi Sravan,

    I would recommend you to go with early binding. Please visit below URL to know more about the advantages of using early binding.

    http://sandrinodimattia.net/blog/post/Early-binding-tips-and-tricks-for-Dynamics-CRM-2011.aspx

    Even in 2011 SDK they have mentioned early binding as "Best practice for developing with Microsoft Dynamics CRM 2011". Visit below URL for the same. Visit performance best practices section.

    http://msdn.microsoft.com/en-us/library/gg509027.aspx

    So with respect to performance view point early binding is more preferable option.

     


    Thanks, Ankit Shah
    Inkey Solutions, India.
    Microsoft Certified Business Management Solutions Professionals
    http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html
    Thursday, May 5, 2011 11:54 AM
  • Guys those answers really helped. We are using a blend of both early binding and late binding. Thanks a lot to all of you. Regrets for the delayed response


    Thanks and Regards, Sravan KC.
    Tuesday, May 24, 2011 11:50 AM
  • Even in 2011 SDK they have mentioned early binding as "Best practice for developing with Microsoft Dynamics CRM 2011". Visit below URL for the same. Visit performance best practices section.

    http://msdn.microsoft.com/en-us/library/gg509027.aspx

    So with respect to performance view point early binding is more preferable option.

    You say that and conceptually it makes sense, yet a quick and dirty test (essentially create 500 accounts in a loop) showed early bound to be slower in our dev environment by 5-20%


    Musings on Information Technology

    Wednesday, July 11, 2012 7:16 AM
  • Hi

    There is not much difference between the early bound and late bound as compared to performance but naturally Late Binding executes little fast but at the cost of other disadvantages of not identifying compile time error..... I would ideally suggest that if the application is small then go for the late binding but if the code is  huge than always to go for the Early Binding(as also suggested by SDK).

    Thanks 

    Deepak K 

    Blog: http://deepakexploring.wordpress.com/



    Deepak Kumar

    Wednesday, July 11, 2012 12:22 PM
  • Custom code written for late-bound entity classes uses less Microsoft Dynamics CRM 2011 resources than custom code written for early-bound entity classes.

    http://msdn.microsoft.com/en-us/library/gg509027.aspx

    • Proposed as answer by Michael Marzouk Wednesday, October 17, 2012 3:42 PM
    Wednesday, October 17, 2012 3:41 PM