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

4 posts, 1 answers
  1. Sean
    Sean avatar
    200 posts
    Member since:
    Nov 2010

    Posted 09 Mar 2011 Link to this post

    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
  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 15 Mar 2011 Link to this post

    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!
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sean
    Sean avatar
    200 posts
    Member since:
    Nov 2010

    Posted 29 Mar 2011 Link to this post

    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
  5. Answer
    Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 01 Apr 2011 Link to this post

    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
Back to Top