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

Slow Ajax response, wondering if I can do something to improve?

3 Answers 43 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 2
Sean asked on 09 Mar 2011, 11:29 PM
Hi all,

I have a RadWindow that pops up. It displays various input fields based on conditions. So, for instance, if a checkbox becomes checked I need to re-enable several controls on the page.

<fieldset>
    <legend>Refresh Settings</legend>
    <table>
        <tr>
            <td class="AutoRefreshEnabled">
                Auto-Refresh Enabled:</td>
            <td class="AutoRefreshCheckbox">
            <asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="True" oncheckedchanged="CheckBox1_CheckedChanged" />
            </td>
            <td class="AutoRefreshNumericTextbox">
                <telerik:RadNumericTextBox ID="RadNumericTextBox1" Runat="server"
                    Label="Auto-Refresh Interval:" MaxValue="60" MinValue="0"
                    ShowSpinButtons="True" Value="0" Width="175px" Enabled="False"
                    LabelCssClass="riLabel LabelDisabled">
                <NumberFormat DecimalDigits="0" />
                </telerik:RadNumericTextBox>
            </td>
        </tr>
    </table>
</fieldset>

protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
    RadNumericTextBox1.Enabled = (sender as CheckBox).Checked;
 
    if (RadNumericTextBox1.Enabled)
    {
        RadNumericTextBox1.LabelCssClass = "LabelEnabled";
    }
    else
    {
        RadNumericTextBox1.LabelCssClass = "LabelDisabled";
    }
}

.LabelEnabled
{
    color: Black !important;
}
 
.LabelDisabled
{
    color: Gray !important;
}
 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="CheckBox1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadNumericTextBox1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
</telerik:RadAjaxManager>

When the user clicks the CheckBox there is an abnormal delay between when the CheckBox becomes checked and when the RadNumericTextBox becomes enabled. When the user un-checks the CheckBox there is no such delay. I experience this same, quirky effect on all similar event-response controls.

I do not want a loading panel -- it would be weird having loading screens over controls for a second. Is there anything I am missing?

Thanks, Sean

3 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 15 Mar 2011, 10:50 AM
Hello Sean,

Thank you for contacting us.

I'm not completely sure what you mean by abnormal delay in this case as my local test doesn’t show such a delay on Ajax request. Please find attached a sample application which uses your code and works as expected in my side. You could also test the application without Ajax enabled and you will see the real difference in the request speed.
As for RadAjax performance optimization I would suggest you to review the following help topic which elaborates on this matter:
http://www.telerik.com/help/aspnet-ajax/ajax-client-side-performance.html

Greetings,

Maria Ilieva
the Telerik team

 

Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Sean
Top achievements
Rank 2
answered on 29 Mar 2011, 10:18 PM
Hi Telerik,

I continue experience this issue.

Here's a video to show you what I am experiencing using the demo project you attached previously.

This is running from Visual Studio 2010 on Google Chrome 10.0.648.204 using Telerik.Web.UI 2010.3.1317.40

http://screencast.com/t/4W3uxqznWrEr -- As you can see when the checkbox becomes unchecked it takes a (relatively) substantial amount of time for the control to update. 

I do not see this issue in Internet Explorer 8.0.76.

Thanks,

Sean
0
Accepted
Maria Ilieva
Telerik team
answered on 01 Apr 2011, 02:44 PM
Hello Sean,

It seems that the problematic behavior is most probably browser behavior and is not directly related to RadAjaxManager control. The same delay could be observed if regular asp UpdatePanel is used instead of RadAjax. Please find attached a sample application which demonstrates this behavior.


Kind regards,
Maria Ilieva
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
Ajax
Asked by
Sean
Top achievements
Rank 2
Answers by
Maria Ilieva
Telerik team
Sean
Top achievements
Rank 2
Share this question
or