Wednesday 20 May 2009

Speed up page loading

Often you find yourself waiting after you made changes in code behind. Delay during first page load has to do with code compilation. With simple modification of web.config you can speed up this process a bit. Main issue is that ASP.NET engine by default compiles all files in folder where you page is place. But you can tell to engine that you are interested only current page and it is related controls/components etc. Do simple change:

Under <configuration><system.web> you can find <compile> element if it does not exists create it. In <compilation> element specify attribute batch with value false.

Changed part of your web.config should looks like:

<compilation batch="false">

No comments: