可能重复:
ASP.NET MVC 性能
我知道有一个学习曲线,但是性能呢?在我看来,Web 表单的性能会降低,但我还没有尝试过 MVC 还不确定。其他人都在经历什么?
可能重复:
ASP.NET MVC 性能
我知道有一个学习曲线,但是性能呢?在我看来,Web 表单的性能会降低,但我还没有尝试过 MVC 还不确定。其他人都在经历什么?
这几乎是一个重复的问题。以下是一些类似的讨论:
The thing about WebForms is that it's very easy to make a page that performs really bad, because it encourages you to do a lot of simple updates server-side that really should be done client-side. If you're paying attention to your postbacks and ViewState then WebForms isn't so bad. Also, MVC has the potential for better performance because it takes fewer steps during a page load, but realizing that potential can require a lot of discipline by the programmer, just like web forms.
这是值得商榷的,因为它们都有不同的性能优缺点,例如 ASP.net MVC 让您可以控制到达浏览器的 HTML/JS,因此您可以最大限度地减少线路上的数据量以使整个应用程序重量少,但是 ASP.net MVC 路由对反射有很大的依赖,这比 Web 窗体正在执行的从磁盘获取文件要慢。