Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET MVC vs WebForms for First Page Load Speed for Big Projects

We have a pretty big ASP.NET WebForm (web application) project with a lot of references to other libraries, other projects etc and most of the time after a compilation, the first time we load a page it takes a LONG time before rendering anything... Disk IO is the main problem. For small projects it's nearly instantaneous, but once your project gets large, it can really slow development and remove fun from programming.

My question: Is first page load time after a compilation as long in ASP.NET MVC as it is in ASP.NET Webforms for big projects?

like image 587
EtienneT Avatar asked Dec 12 '25 22:12

EtienneT


2 Answers

MVC still uses the same ASP.NET framework as Web Forms, so you are probably going to see similar behavior, regardless.

The long first load time is because your project's build output is still just IL code that needs to be compiled into native code by the JIT compiler before executing. Any code changes that you make will cause the previously cached native code for your app to be discarded, so the JIT has to recompile. Naturally, the larger your project, the longer it's going to take for the JIT to process it.

like image 145
Jeromy Irvine Avatar answered Dec 15 '25 16:12

Jeromy Irvine


You will see similar load times in both environments.

In both environments, if your site gets large you should pre-compile your site before deployment. This will eliminate the performance drag on first page load.

like image 40
Stephen M. Redd Avatar answered Dec 15 '25 14:12

Stephen M. Redd



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!