问题描述
我试图尽量减少对 ScriptResource.axd
的调用,但我失败了.下面是结果
I am trying to minimize calls to ScriptResource.axd
but i have failed. Below is the result
Uaing .Net 4.0, AjaxControlToolkit ver 4.1.60919.0 和 ScriptManager 添加为
Uaing .Net 4.0, AjaxControlToolkit ver 4.1.60919.0 and ScriptManager is added as
<asp:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Release">
<CompositeScript>
<Scripts>
<asp:ScriptReference name="MicrosoftAjax.js"/>
<asp:ScriptReference name="MicrosoftAjaxWebForms.js"/>
<asp:ScriptReference name="Compat.Timer.Timer.js" assembly="AjaxControlToolkit, Version=4.1.60919.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"/>
<asp:ScriptReference name="Common.Common.js" assembly="AjaxControlToolkit, Version=4.1.60919.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"/>
<asp:ScriptReference name="Animation.Animations.js" assembly="AjaxControlToolkit, Version=4.1.60919.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"/>
<asp:ScriptReference name="ExtenderBase.BaseScripts.js" assembly="AjaxControlToolkit, Version=4.1.60919.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"/>
<asp:ScriptReference name="CollapsiblePanel.CollapsiblePanelBehavior.js" assembly="AjaxControlToolkit, Version=4.1.60919.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"/>
</Scripts>
</CompositeScript>
</asp:ScriptManager>
我的网站运行良好,但突然客户开始抱怨它很慢.我从客户端检查了网站,发现每次点击都需要大约.10 秒,无论是数据库调用还是简单的循环到 30 秒.
My website was working fine but suddenly customers started complaining that it is slow. I checked the website from client side and found that every single click takes approx. 10 seconds, whether it be a DB call or just a simple loop upto 30.
我检查发现Application_BeginRequest
和Application_EndRequest
之间的时间不到一秒.然后在 IE Profiler 上,我开始知道对 ScriptResource.axd
有各种调用,因此试图缩小这些调用.
I checked and found that the time between Application_BeginRequest
and Application_EndRequest
is less than a second. Then on IE Profiler i came to know that there are various calls to ScriptResource.axd
and so trying to minify these calls.
请帮忙,让我知道这些配置有什么问题.
Kindly help and let me know what is wrong with these configs.
编辑到目前为止,在缩小对 ScriptResource.axd
的调用方面没有成功.我很确定
Edit
No success so far in minifying calls to ScriptResource.axd
. I am pretty much sure that
每次点击大约需要.10秒
every single click takes approx. 10 seconds
因为对ScriptResource.axd
的多次调用.如果是其他原因导致如此多的延迟,请引导我走向正确的方向.
because of these multiple calls to ScriptResource.axd
. If it is something else which is causing this much delay then please guid me towards right direction.
推荐答案
有一个 DropDownList,其中在客户端加载了大约 30,000 条记录.这是出乎意料的.我用一个查找屏幕替换了这个 DropDownList,事情开始按预期工作.
There was a DropDownList in which, at client side, ~30,000 records were being loaded. This was unexpected. I replaced this DropDownList with a lookup screen and things started working as expected.
这篇关于组合对 ScriptResource.axd 的多次调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!