本文介绍了结合对ScriptResource.axd的多次调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试最小化对 ScriptResource.axd 的调用,但是失败了.以下是结果

I am trying to minimize calls to ScriptResource.axd but i have failed. Below is the result

在.Net 4.0中,AjaxControlToolkit版本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 的调用方面没有成功.我非常确定

EditNo success so far in minifying calls to ScriptResource.axd. I am pretty much sure that

因为多次调用 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的多次调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-17 22:55