Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best way to improve ASP.NET/C# compilation speed?

Tags:

c#

.net

asp.net

UPDATE: Focus your answers on hardware solutions please.

What hardware/tools/add-in are you using to improve ASP.NET compilation and first execution speed? We are looking at solid state hard drives to speed things up, but the prices are really high right now.

I have two 7200rpm harddrives in RAID 0 right now and I'm not satisfied with the performance anymore.

So my main question is what is the best cost effective way right now to improve ASP.NET compilation speed and overall development performance when you do a lot of debugging?

Scott Gu has a pretty good blog post about this, anyone has anything else to suggest?

http://weblogs.asp.net/scottgu/archive/2007/11/01/tip-trick-hard-drive-speed-and-visual-studio-performance.aspx

like image 374
EtienneT Avatar asked Sep 21 '08 19:09

EtienneT


3 Answers

One of the important things to do is keeping projects of not-so-often changed assemblies unloaded. When a change occurs, load it, compile and unload again. It makes huge differences in large solutions.

like image 139
Serhat Ozgel Avatar answered Oct 31 '22 19:10

Serhat Ozgel


First make sure your that you are using Web Application Projects (WAP). In our experience, compared to Website Projects, WAP compiles roughly 10x faster.

Then, consider migrating all the logic (including complex UI components) into separate library projects. The C# compiler way faster than the ASP.NET compiler (at least for VS2005).

like image 34
Joannes Vermorel Avatar answered Oct 31 '22 18:10

Joannes Vermorel


If you have lots of 3rd party "Referenced Assemblies" ensuring that CopyLocal=False on all projects except for the web application project makes quite a big difference.

I blogged about the perf increases I managed to get by making this simple change:

Speeding Up your Desktop Build - Part 1

like image 1
HowardvanRooijen Avatar answered Oct 31 '22 18:10

HowardvanRooijen