Code contracts slow down Visual Studio 2008
Since I started to use Code Contracts in Visual Studio 2008 (C#), buildi开发者_JS百科ng my dlls goes really slow. I haven't got static checking turned on, but apparently rewriting takes forever...
Is there way to solve this and will this be improved in future versions of Microsoft Code Contracts?
Update: When building in VS2008, even when Static analysis is turned off in the properties of assemblies, it does run a static analysis for each dll...
They are aware of performance issues and are working on improving them. How much they will be able to speed it up, however, remains to be seen.
The following posts are taken from the Code Contracts forum.
From the Build Slowdown thread:
We are aware of the slow down imposed by the rewriter (we suffer from it too). It will get better in the future, but I'm afraid I can't give you any promise of when and how much.
From the cccheck - excessive memory & processor usage? thread:
Yes, we are aware of the memory/time consumption issues on large projects, or projects that reference many dlls. We have made some progress on this on our internal builds and hope to release that soon.
For static checking large projects, the checker is quite slow and we are working on incremental checking which should also help.
精彩评论