ASP.Net Web表单瓦特/ AJAX渲染速度慢 [英] ASP.Net Webforms w/ AJAX Slow Rendering

查看:376
本文介绍了ASP.Net Web表单瓦特/ AJAX渲染速度慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个支持AJAX的Web表单,网页其中,呈现大量数据时,在IE加载速度极慢(我们结婚了IE浏览器 - 没有任何其他浏览器选项)。在试图确定缓慢的根源,我看HTML源代码(约2.5 MB),并复制这一切(除了Ajax的JavaScript调用)到空白的.html文件。 IE渲染此文件要比当渲染发生过的.Net更快。这似乎表明,AJAX JavaScript是减慢页面的显示。这是否看似有理?在这里提高性能的任何建议?

I have a Webforms, AJAX-enabled web page which, when rendering large amounts of data, is extremely slow to load in IE (we're married to IE - no other browser options). In an attempt to determine the source of the slowness, I viewed the HTML source (about 2.5 MB) and copied all of it (except for the Ajax JavaScript calls) to a blank .html file. IE renders this file MUCH faster than when the rendering happens through .Net. This seems to indicate that the AJAX JavaScript is slowing down the display of the page. Does this sound plausible? Any recommendations on improving performance here?

我已经消灭尽可能多的UpdatePanel控件,我可以从页,但它似乎并没有帮助渲染时间。

I've already eliminated as many UpdatePanel controls as I can from the page, but it doesn't seem to help with render time.

感谢您的帮助!

更新...在HTML源代码中,我注意到,在屏幕的底部,似乎WebForm_InitCallback()的调用。当我直接通过JavaScript执行这一呼吁:警惕(WebForm_InitCallback());, 12秒的CPU峰值之前它完成!此调用是在这里,因为我实现了ICallbackEventHandler尝试完成一些传统风格的AJAX处理。看着WebResource.axd的,即通过整个形式WebForm_InitCallback()方法迭代并附加一些活动,以每一个文本框,复选框,单选按钮等,所以我想我真的需要完全放弃在这里和的ScriptManager的UpdatePanel。船尾。

Update... In the HTML source, I noticed that at the bottom of the screen, a call to WebForm_InitCallback() appears. When I executed this call directly through javascript:alert(WebForm_InitCallback());, the CPU spikes for 12 seconds before it completes! This call is here because I implemented ICallbackEventHandler to try to accomplish some traditional-style AJAX handling. Looking at WebResource.axd, that WebForm_InitCallback() method iterates through the entire form and attaches some kind of events to EVERY SINGLE textbox, checkbox, radiobutton, etc. So I guess I really need to abandon ScriptManager and UpdatePanel altogether here. Poop.

刘德华

推荐答案

我讨厌这样说,但你可以采取微软的AJAX的方程?与做一个XMLHTTP请求尝试一下,自己填充数据。这样,至少你可以单步执行js和弄清楚,如果是在服务器上时,转动时所产生的XML或JSON成一个对象,或花时间填充屏幕上的数据。

I hate to say this, but can you take the Microsoft AJAX out of the equation? Try it with doing an XMLHTTP request and populate the data yourself. That way at least you could step through the js and figure out if it is time on the server, time turning the resulting XML or JSON into an object, or time spent populating your data on screen.

这篇关于ASP.Net Web表单瓦特/ AJAX渲染速度慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆