ASP.NET and AJAX library - Extremely slow !
So, 开发者_如何学Ci'm new to ASP.NET and AJAX. I am trying out the Beta library.
I setup a page and was using the Editor. The loading of this page is well, slow.
There is nothing more than then, you can see it here
http://eski.internet.is/default.aspx but it will take a min to load.
Whats is the reason for the slow load, is it the AJAX library ? Its about 7 mb, the .dll's. Is it downloading it everytime you load the page ?
No, it doesn't load the whole 7mb worth of .dlls - that's the code that generates the output.
For that site I'm getting this from YSlow: HTTP Requests - 46 Total Weight - 304.9K
1 HTML/Text 121.9K
4 JavaScript File 161.7K
3 Stylesheet File 6.4K
38 Image 14.7K
Which isn't that much. It did seem to take a LONG time for the host to respond, however. What are the specs on your server and its internet connection?
In your web.config do you have debug="true"? If so, take that out as it can cause pages to take longer as it then generates debug information.
It doesn't seem to be hanging on any one component being served to the client. It seems to be either server load or something in your code. Can you provide the code that you are using to better help diagnose this?
This is the code that website http://eski.internet.is/default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit.HTMLEditor" tagprefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" ScriptMode="Release"></asp:ToolkitScriptManager>
</div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:DropShadowExtender ID="TextBox1_DropShadowExtender" runat="server"
Enabled="True" TargetControlID="TextBox1">
</asp:DropShadowExtender>
<asp:CalendarExtender ID="TextBox1_CalendarExtender" runat="server"
Enabled="True" TargetControlID="TextBox1">
</asp:CalendarExtender>
<asp:Button ID="Button1" runat="server" onclick="Button1_Click"
Text="To Editor" />
<br />
<br />
<cc1:Editor ID="Editor1" runat="server" Width="500" />
<br />
<asp:Button ID="Button2" runat="server" Text="To Textbox"
onclick="Button2_Click" />
<br />
<br />
<asp:TextBox ID="TextBox2" runat="server" Height="161px" TextMode="MultiLine"
Width="600px"></asp:TextBox>
</form>
</body>
</html>
精彩评论