This is a migrated thread and some comments may be shown as answers.

Page loads VERY slow

4 Answers 162 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Cliff Gibson
Top achievements
Rank 1
Cliff Gibson asked on 09 Jun 2010, 09:32 AM
I've just moved to the Telerik Ajax controls from standard .Net controls and am finding the page load times to be incredibly slow.

I've got a simple Rad Window popup box that contains a couple of text boxes and a combo box (5 records) and the page load time is around 5 seconds which is far too long.

I'm using the RadScriptManager, StyleSheetManager and AjaxManager, along with setting web config debug=false but still none of this has made a difference.  I've even removed all the controls but the load time is still extremelly slow...

Code below, hopefully you can tell me where I'm going wrong...

Cheers
Cliff

Master Page for popup:

<%

 

@ Master Language="C#"

 

 

 

AutoEventWireup="true"

 

 

 

CodeFile="MasterPageDialogs.master.cs"

 

 

 

Inherits="MasterPageDialogs"

 

%>

<%

 

@ Register Assembly="Telerik.Web.UI"

 

 

 

Namespace="Telerik.Web.UI"

 

 

 

TagPrefix="telerik"

 

%>

<!

 

 

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">

 

 

 

<asp:ContentPlaceHolder id="head" runat="server">

 

 

 

</asp:ContentPlaceHolder>

 

</

 

 

head>

 

<

 

 

body>

 

 

 

<form id="form1" runat="server">

 

 

 

 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>

 

 

 

<telerik:RadSkinManager ID="RadSkinManager1" runat="server" Skin="Windows7"></telerik:RadSkinManager>

 

 

 

<telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server"></telerik:RadStyleSheetManager>

 

 

 

<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Windows7" />

 

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"></telerik:RadAjaxManager>

 

 

 

<div>

 

 

 

<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">

 

 

 

 

</asp:ContentPlaceHolder>

 

 

 

</div>

 

 

 

 

<!-- Popup Dialog/Windows, e.g. MessageBox -->

 

 

 

 

<telerik:RadWindowManager ID="RadWindowManager" runat="server"

 

 

 

Behavior="Default" InitialBehavior="None" EnableViewState="False">

 

 

 

<Windows>

 

 

 

<telerik:RadWindow runat="server" ID="RadWindowMessageBox" Behavior="Default" InitialBehavior="None"

 

 

 

NavigateUrl="~/Dialogs/MessageBox.aspx" ReloadOnShow="true" Animation="None"

 

 

 

Height="150px" Modal="true" Title="MessageBox" Width="350px" AnimationDuration="750" Behaviors="Close" Enabled="True" VisibleStatusbar="False" IconUrl="~/favicon.ico">

 

 

 

</telerik:RadWindow>

 

 

 

</Windows>

 

 

 

</telerik:RadWindowManager>

 

 

 

 

</form>

 

</

 

 

body>

 

</

 

 

html>

 



POPUP aspx:

<%

 

@ Page Title=""

 

 

 

Language="C#"

 

 

 

MasterPageFile="~/MasterPageDialogs.master"

 

 

 

AutoEventWireup="true"

 

 

 

CodeFile="CreateTask.aspx.cs"

 

 

 

Inherits="Dialogs_CreateTask"

 

%>

<%

 

@ MasterType VirtualPath="~/MasterPageDialogs.master" %>

 

<%

 

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

<

 

 

asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"></asp:Content>

 

<

 

 

asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

 

<

 

 

telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"></telerik:RadAjaxManagerProxy>

 

 

 

 

<script type="text/javascript">

 

 

 

function GetRadWindow() {

 

 

 

var oWindow = null;

 

 

 

if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog

 

 

 

else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz az well)

 

 

 

return oWindow;

 

}

 

 

function CloseOnReload() {

 

GetRadWindow().close();

}

 

 

function RefreshParentPage() {

 

GetRadWindow().BrowserWindow.location.href = GetRadWindow().BrowserWindow.location.href;

}

 

 

</script>

 

 

 

<table cellpadding="1" cellspacing="1" border="0" width="100%">

 

 

 

<tr>

 

 

 

<td>

 

 

 

<asp:Label ID="lblTitle" runat="server" Text="Title:"></asp:Label>

 

 

 

</td>

 

 

 

<td>

 

 

 

<telerik:RadTextBox ID="txtTitle" runat="server" Width="290px"></telerik:RadTextBox>

 

 

 

</td>

 

 

 

</tr>

 

 

 

<tr>

 

 

 

<td>

 

 

 

<asp:Label ID="lblDescription" runat="server" Text="Description:"></asp:Label>

 

 

 

</td>

 

 

 

<td>

 

 

 

<telerik:RadTextBox ID="txtDescription" runat="server" Width="290px" ></telerik:RadTextBox>

 

 

 

</td>

 

 

 

</tr>

 

 

 

<tr>

 

 

 

<td>

 

 

 

<asp:Label ID="lblEvent" runat="server" Text="Event:"></asp:Label>

 

 

 

</td>

 

 

 

<td>

 

 

 

<telerik:RadComboBox ID="cboEvents" Runat="server" Width="290px"></telerik:RadComboBox>

 

 

 

</td>

 

 

 

</tr>

 

 

 

<tr>

 

 

 

<td>

 

 

 

<asp:Label ID="lblDueDate" runat="server" Text="Due Date:"></asp:Label>

 

 

 

</td>

 

 

 

<td>

 

 

 

<telerik:RadDatePicker runat="server" ID="RadDatePickerDueDate"></telerik:RadDatePicker>

 

 

 

</td>

 

 

 

</tr>

 

 

 

<tr>

 

 

 

<td colspan="2">

 

 

 

&nbsp;

 

 

 

</td>

 

 

 

</tr>

 

 

 

<tr align="center">

 

 

 

<td colspan="2">

 

 

 

<asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click"></asp:Button>

 

 

 

</td>

 

 

 

</tr>

 

 

 

</table>

 

</

 

 

asp:Content>

 

 

POPUP Code:

 

using

 

 

System;

 

 

 

 

using

 

 

Telerik.Web.UI;

 

 

 

 

public

 

 

partial class Dialogs_CreateTask : System.Web.UI.Page

 

 

 

 

 

{

 

 

 

#region

 

 

Events

 

 

 

protected void Page_Load(object sender, EventArgs e)

 

{

 

 

try

 

 

 

 

 

{

 

 

if (!IsPostBack)

 

{

LoadEvents();

}

}

 

 

catch (Exception ex)

 

{

Master.ShowMsgBoxPopup(

 

"Error Loading Page", Napp_ErrorTrapping.BuildExeceptionMessage(ex));

 

}

}

 

 

protected void btnSave_Click(object sender, EventArgs e)

 

{

 

 

try

 

 

 

 

 

{

 

 

string result = ControlsAreValid();

 

 

 

if (result == "Success")

 

{

 

 

string username = Page.User.Identity.Name;

 

 

 

string taskID = EM_Data.CreateTask(txtTitle.Text,

 

txtDescription.Text,

username,

RadDatePickerDueDate.SelectedDate.ToString(),

 

 

int.Parse(cboEvents.SelectedValue));

 

Session.Add(

 

"ACTION", "TASK ADDED");

 

Session.Add(

 

"TASK_ID", taskID);

 

 

 

RadScriptManager.RegisterStartupScript(this, this.GetType(), "closeWindow", "RefreshParentPage();", true);

 

 

 

RadScriptManager.RegisterStartupScript(this, this.GetType(), "closeWindow", "CloseOnReload();", true);

 

}

 

 

else

 

 

 

 

 

{

Master.ShowMsgBoxPopup(

 

"Cannot Save Task", result);

 

}

}

 

 

catch (Exception ex)

 

{

Master.ShowMsgBoxPopup(

 

"Cannot Save Task", Napp_ErrorTrapping.BuildExeceptionMessage(ex));

 

}

}

 

 

 

#endregion

 

 

 

 

#region

 

 

Methods

 

 

 

private string ControlsAreValid()

 

{

 

 

string result = "Success";

 

 

 

if (txtTitle.Text == "")

 

result =

 

"Please enter a 'Title' for this task.";

 

 

 

if (RadDatePickerDueDate.SelectedDate == null)

 

result =

 

"Please enter a 'Due Date' for this task.";

 

 

 

if (cboEvents.SelectedValue == "0")

 

result =

 

"Please select an 'Event' for this task.";

 

 

 

 

 

return result;

 

}

 

 

private void LoadEvents()

 

{

cboEvents.DataValueField =

 

"EventID";

 

cboEvents.DataTextField =

 

"EventTitle";

 

cboEvents.DataSource =

 

EM_Data.SearchEvents(Page.User.Identity.Name, true);

 

cboEvents.DataBind();

}

 

 

 

#endregion

 

 

 

 

}

4 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 09 Jun 2010, 05:24 PM
Hi Cliff,

Can you please give us a bit more details about your set-up.? What browser are you using and are you accessing the application locally or over the network?

For example, there's a known issue with Firefox when browsing localhost that can be easily solved.

I hope this helps.

Greetings,
Tsvetomir Tsonev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
sitefinitysteve
Top achievements
Rank 2
Veteran
answered on 10 Jun 2010, 01:07 PM
Install YSlow and Firebug, what are the stats from those (page size, # of requests, etc)
0
Cliff Gibson
Top achievements
Rank 1
answered on 10 Jun 2010, 01:10 PM
Hi

My dev environment is Windows 7, IE8 and VS 2010 - with SQL Server 2005 backend.  Server I'm publishing to is Windows Server 2003 and IIS.

I'll check out YSlow and Firebug too.

Cheers
Cliff
0
T. Tsonev
Telerik team
answered on 10 Jun 2010, 01:21 PM
Hi Cliff,

You can also send us a web session recording using FiddlerCap (or its big brother Fiddler). This will give us an idea if the delay is occurring on the server or on the client.

For client-side profiling you can use Firebug - http://getfirebug.com/javascript. You can use it to track down slow parts of the client code.

I hope this helps.

Best wishes,
Tsvetomir Tsonev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
Cliff Gibson
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
sitefinitysteve
Top achievements
Rank 2
Veteran
Cliff Gibson
Top achievements
Rank 1
Share this question
or