Code Contacts June 2011 -> Mazrch 2012 SLOWER

Proposed Answer Code Contacts June 2011 -> Mazrch 2012 SLOWER

  • Thursday, April 19, 2012 6:12 AM
     
     

    Hi Guys

    When we migrated from the June 2011 to Dec 2011/Jan 2012 contracts, we noticed a significant slow down - and we reported this to you. SLOW method analysis etc gave nothing of interest. We made sure all settings remained the same.

    I have just installed the March 2012 version hoping it is fixed - but same thing. Our projects used to take 20 minutes to build with full contract analysis, and now they take about 37. (this is a fresh time with NO cache - ie delete all bin/obj folders).

    I don't know what more diagnosis to do.

    Can you identify anything that could be causing this? We love contracts and have them deeply embedded in our system but are stuck on the June 2011 version until performance is back up to par.

All Replies

  • Friday, April 20, 2012 1:43 PM
     
     

    I noticed similar performance degradation after updating to March 2012 release. I'm using CodeContracts in a Visual Studio Solution with about 30 projects and compile time is now almost intolerable. 

    I update from version 1.4.40602.0 which has much faster compile times.

    Marco Studer

  • Friday, April 20, 2012 5:02 PM
    Owner
     
     Proposed Answer

    Sorry to hear that. We have done some performance improvements in our internal build.

    I'd love to know if you have a repro for the performance regression.

    One way to get it is to add the "-show slowmethods" in the VS integration, and then check in the output window which are those slow methods.

    thanks

    f

  • Sunday, April 22, 2012 11:28 AM
     
     
    Do I add this option to the "Extra Static Checker Options"? There is no additional information shown in the build output window if i set it there.

    For now I can give you some numbers for compiling a vs project with 2102 LoC with Runtime Contract Checking set to Full.

    Release 1.4.50327.0: elapsed time: 5296.303ms

    Release 1.4.31130.0: elapsed time: 957.0547ms

    I used the rather old release 1.4.50327.0 for comparison because I can't find the MSI of my previously installed Release 1.4.40602.0 anymore. It seems that it can't be downloaded anymore from the download site. Unfortunately Release  1.4.31130.0 has a bug that manifests in one of the projects in my solution. It would be great if you could provide me a download link to Release 1.4.40602.0 so I could use Code Contracts again in my solution.

    Marco


  • Saturday, May 05, 2012 7:50 AM
     
     

    Are you able to release this internal build for us to try?

    I can profile and identify the hot spots for us if you like (I work with Zubin).

  • Tuesday, May 08, 2012 2:45 AM
     
     

    Yes, that would be a great way forward. We are more than happy to work with you on testing Code Contracts on our large code base. Currently we are stuck not being able to upgrade to the new code contracts due to the significant performance drop.

    Happy to help you however we can to resolve this - please let us know.