tags:

views:

292

answers:

2

We recently introduced PostSharp into our code base and the compile time of our ASP.NET MVC project has doubled to quadrupled. We have about 3 MVC projects and approximately 8 class library projects in our solution.

Obviously there will be overhead associated with PostSharp since it is modifying the MSIL code. But a 2x to 4x overhead is quite an overhead.

Is this typical with PostSharp?

+2  A: 

For the assemblies where you are sure that PostSharp will not perform any injection you can add the flag SkipPostSharp in the Conditional compilation symbols on the Build Tab for the project.

Hope this helps.

jvanrhyn
+2  A: 

A typical overhead of 2x is normal. The most important way to speed up PostSharp 1.5 is to use ngenned images (the setup program does it for you). In PostSharp 2.0, ngenned images are not considered that important any more.

If you really have an overhead of 4x with PostSharp 2.0, I would like to make some performance analysis of your case. You can contact me at gael at sharpcrafters dot com.

-gael

Gael Fraiteur