Reduce PostSharp compilation build time

We recently introduced PostSharp to our code base, and the compilation time of our ASP.NET MVC project doubled up to four times. We have about 3 MVC projects and about 8 class library projects in our solution.

Obviously, there will be overhead associated with PostSharp since this is a change to the MSIL code . But overhead from 2x to 4x is pretty overhead.

Is this typical of PostSharp?

+3
source share
2 answers

For assemblies in which you are sure that PostSharp will not perform any injection, you can add the SkipPostSharp flag to conditional compilation symbols on the Assembly tab for the project.

Hope this helps.

+3
source

Typical 2x overheads are normal. The most important way to speed up PostSharp 1.5 is to use ngenned images (the installer does this for you). In PostSharp 2.0, images with extended images are no longer considered important.

If you really have 4x overhead with PostSharp 2.0, I would like to do a performance analysis of your case.

+2
source

Source: https://habr.com/ru/post/1722842/


All Articles