Ajax性能:ASP.Net MVC vs Webforms

时间:2021-09-09 06:06:43

I just switch my website over to MVC from Webforms and I am using ajax very heavily. MVC seems to be slower but I haven't set up anything to record benchmarks.

我只是将我的网站从Webforms切换到MVC,我使用ajax非常重要。 MVC似乎比较慢,但我没有设置任何记录基准。

Does anyone know which is faster for ajax handling and why it's faster?

有谁知道哪个更快的ajax处理和为什么它更快?

2 个解决方案

#1


You shouldn't see any difference from one framework to the next. They are essentially the same with an exception of less things going on in the execution pipeline of the MVC framework, less stored (no state tracking), etc. How are you doing ajax in your site? Are you using partials? Full views? Rendering json or fully formatted html chunks?

您不应该看到从一个框架到下一个框架的任何差异。它们本质上是相同的,除了MVC框架的执行管道中发生的事情少,存储少(没有状态跟踪)等等。你在网站上做ajax怎么样?你在使用偏见吗?全景?渲染json或完全格式化的html块?

#2


A good tool to use for profiling is either Firebug in Firefox, or Fiddler for IE/Chrome.

用于分析的一个好工具是Firefox中的Firebug或IE / Chrome的Fiddler。

AJAX is known for being very chatty with the web server without the users knowledge , whereas a Webform is very explicit in showing when it is posting data back to the server.

AJAX以在没有用户知识的情况下对Web服务器非常健谈而闻名,而Webform在显示何时将数据发布回服务器时非常明确。

It could be psychological, but profile the HTTP connections yourself and see!

这可能是心理上的,但是自己查看HTTP连接并查看!

#1


You shouldn't see any difference from one framework to the next. They are essentially the same with an exception of less things going on in the execution pipeline of the MVC framework, less stored (no state tracking), etc. How are you doing ajax in your site? Are you using partials? Full views? Rendering json or fully formatted html chunks?

您不应该看到从一个框架到下一个框架的任何差异。它们本质上是相同的,除了MVC框架的执行管道中发生的事情少,存储少(没有状态跟踪)等等。你在网站上做ajax怎么样?你在使用偏见吗?全景?渲染json或完全格式化的html块?

#2


A good tool to use for profiling is either Firebug in Firefox, or Fiddler for IE/Chrome.

用于分析的一个好工具是Firefox中的Firebug或IE / Chrome的Fiddler。

AJAX is known for being very chatty with the web server without the users knowledge , whereas a Webform is very explicit in showing when it is posting data back to the server.

AJAX以在没有用户知识的情况下对Web服务器非常健谈而闻名,而Webform在显示何时将数据发布回服务器时非常明确。

It could be psychological, but profile the HTTP connections yourself and see!

这可能是心理上的,但是自己查看HTTP连接并查看!