Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 13, 2012 07:13 AM by karthik437
Apr 13, 2012 02:02 AM|LINK
Has anyone seen any performance data comparing MVC and Web Forms?
I understand the architecure differences but I have never come across any perfomance numbers.
Apr 13, 2012 02:06 AM|LINK
While not exactly performance data, this is a thread on Stack Overflow discussing the same topic:
WebForms vs MVC (discusses performance, ease-of-use, etc.)
Apr 13, 2012 02:07 AM|LINK
Here are a few more (primarily based on performance)
MVC vs Webforms Performance
A Clear Loser Emerging : MVC vs Webforms
Speed and Architecture Comparision : MVC vs Webforms
Apr 13, 2012 02:40 AM|LINK
there is no practical way to compare performance, as generally you will will use different patterns to code a site in one vs the other.
both are built on the asp.net fraemwork, and have the same httprequest events. webforms adds page life cycle events. mvc controllers use model binding. in webforms controls lookup their values via a dictionary lookup, mvc model binding is done via reflection.
webforms are more efficent here, but require building the whole control tree. the more controls, the more overhead. but webform databinding also uses refection, so if you use webform databinding, then you lose its performance edge.
currently razor views are slower than webforms views, but i'd still use razor.
but look at all the code that is the same, database, entities, business rules, sesison mgt, etc. except for the most trival apps, this is the bottleneck, not the html rendering engine.
Apr 13, 2012 03:10 AM|LINK
Thanks everyone for the answers.
I understand the architecture differences and it would seem that MVC has much less overhead than Web Forms.
I also understand that performance will have many factors in addition to .NET such has database and hardware.
However, I was hoping someone had actually implemented a database sample application using both for a side by side comparison, especially for high volume web sites.
Personally, I like Razor and would rather not work on another Web Forms project but it would be nice to have hard data.
Apr 13, 2012 03:41 AM|LINK
, I was hoping someone had actually implemented a database sample application using both for a side by side comparison, especially for high volume web sites.
Many have this idea. However, it is not feasible. Who do you think that can, for high volume web sites, do twice the programming and pay the programmers ?
Apr 13, 2012 03:58 AM|LINK
Of course no one would do this for a business but Microsoft might do it for their own research. It would not have to be a large web site but only one that you could use to generate lots of test transactions.
And they would have to be smart enough to make sure each code is comparably efficient. They might even be able to implement the same business layer and data access layer.
Just a thought.
Apr 13, 2012 04:08 AM|LINK
Microsoft might do it for their own research.
What will be the benefit for Microsoft to do that? There are more studies / researches to do than that ( asp.net versus php, mvc versus ruby on rails ) then programmers... So I think ( and it's normal) Microsoft will do first the most advantages - and
later( if it comes...) the others.
They might even be able to implement the same business layer and data access layer.
I realize to put same BL and DAL in MVC and in DOS : see
I do not have considered WebForms as a viable comparison. Maybe you will take my example further ? ;-)
Apr 13, 2012 05:20 AM|LINK
This is the only post with numbers that I have found. It is from 2009.
Apr 13, 2012 07:13 AM|LINK
Actually mvc is an archictere, where as in wbforms are serverside web pages. there is Performance diffenence between aspx engine and razor engine. mostly mvc is used for Larger scope Projects. Compare to Aspx Engine Razor Engine Performance
Is high Because Ther Is no view State in Razor Engine.