Over the last few days, I’ve been scouring the web for techniques and strategies to optimize ASP.NET code so that it runs faster and more efficient, resulting in quicker load times. A lot of what I found was pretty standard advice, disable viewstate, use the StringBuilder for concatenation, disable tracing and use AJAX. One piece of advice that I didn’t find when searching was to be selective about the libraries that you reference.
By default, ASP.NET will add the following references to your page:
In a library that I was using, I was able to pair those down to these five libraries:
After removing the un-necessary libraries, the page load time decreased by nearly half of a second. If you were to do this with all of your libraries and pages, chances are you could see a pretty significant performance increase.