I’m gradually building quite a complex project.
In the process of which I am also learning ASP.NET which I am new to.
Consequently, having experimented with various plugins (ASP.NET AJAX, JSON.NET) and found that in fact I didn’t need them, my web.config file has become rather full up with lines added by Visual Studio, which in fact aren’t used.
Since they’ve been automatically added and I am new to ASP.NET I am not sure which lines can be removed and which can’t (some are more obvious than others of course)
So I was wondering what performance affect, if any, these extra lines, which may refer to unused plugin, will have.
Just for example, I have decided to stick entirely with jQuery for all my AJAX requirements. If I were to leave the AJAX.NET code lines in the web.config file (and the .dlls in my bin folder) will this affect performance, or is none of this loaded unless requested?
(if it makes any difference, I am coding with VB, not C#)
The web.config data is cached when an application first starts. Changes to the web.config will make your app restart.
So extra lines won’t give you any performance problems because it’s only loaded once.
However, if you refer to any unused HttpModules in your web.config this could reduce performance (Check tip 3 at 50 Tips to Boost ASP.NET Performance). You should remove them to make sure they don’t run each request.