ListBox update with RadAjaxManager very-2 slow

4 posts, 0 answers
  1. kachy
    kachy avatar
    90 posts
    Member since:
    Aug 2005

    Posted 06 May 2010 Link to this post

    Hi,

    I have 2 multiselect listboxes in my webpage. when the selected index of first listbox is changed, it updates the second listbox. there are only 10 items in first listbox and 45 items in second listbox when all the 10 items in first listbox are selected. Autopostback for first listbox is set to true and selectedindexchanged event has code to update the second listbox from database. For some reason, this process is very-2 slow, even if I select only one item in first, it takes around 15-16 seconds to load second listbox. I have a RadGrid in the page which is loaded when a button is clicked. I have separate RadAjaxManager setting for button update and listbox update. Can you please suggest how can I make the listbox load faster or what should I check to solve this problem? I also noticed that most of the pages are faster without AJAX. I have gone through the document on Telerik about how to make AJAX faster and have implemenetd the ASP Scriptmanager setting to be in release mode and also debug=false web config setting.

    Thanks.
  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 12 May 2010 Link to this post

    Hi Kachy,

    I'm not sure if I completely understand the exact scenario and the issue you are facing. Does the application runs faster if the Ajax is disabled on the page? Also what are the results if you are using regular asp UpdatePanel instead of RadAjax? 
    Please confirm if there are any tables that are rendered more than one time on the page. For more information on the RadAjax performance optimization please review the following help topic.


    Best wishes,
    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.
  3. kachy
    kachy avatar
    90 posts
    Member since:
    Aug 2005

    Posted 30 Jul 2010 Link to this post

    I used Fiddler to check my packet size and this is the detail

    On Page load
    Bytes Sent:  3,213
    Bytes Received: 253,154

    List Box Selected Index Changed
    Bytes Sent:  67,791
    Bytes Received: 59,428

    second time listbox selected index change
    Bytes Sent:  68,155
    Bytes Received: 59,718

    Clicked on Search Button, so the grid loaded
    Bytes Sent:  68,421
    Bytes Received: 448,327

    After grid is loaded, listbox selected index changed
    Bytes Sent:  242,888
    Bytes Received: 233,327

    In my page, there are 2 ASP Listboxes. When the value of first one changes, second Listbox is repopulated. There are other parameters for search like name, dob etc.
    There is a search button, when search button is clicked, all the parameters needed for search is sent to the server and grid gets populated. If you see the Bytes Sent and Bytes Received above, if I select the Listbox1 after the grid is laoded, the bytes sent and received is far more than when the grid is not loaded. As per my understanding of Ajax, when I select the first Listbox irrespective of whatever else is on page, it should send the Listbox1 value to the server and bring me back the listbox2 value. why the bytes sent and bytes received in second scenario, when the grid is populated is so high as compared to when the grid is not loaded.

    This is my RadAjaxManagerSetting:

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true"
            onajaxrequest="RadAjaxManager1_AjaxRequest">
            <ClientEvents OnRequestStart="OnRequestStart" />
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid" />
                    <telerik:AjaxUpdatedControl ControlID="ListBoxAll1" />
                    <telerik:AjaxUpdatedControl ControlID="ListBoxAll2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="ListBox1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ListBox2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="buttonSearch">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid" />
                    <telerik:AjaxUpdatedControl ControlID="buttonSearch" />
                    <telerik:AjaxUpdatedControl ControlID="labelMessage" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadMenu1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid"/>
                </UpdatedControls>
            </telerik:AjaxSetting>
       </AjaxSettings>
    </telerik:RadAjaxManager>

    RadMenu1 is the ContextMent for RadGrid.  labelMessage is a Label control to show if error occurs during search. I have added ListBox1 and ListBox2 as Updated Control for RadAjaxManager1 because in IE6, if I don't add that, ListBox1, ListBox2 disappears after grid is refreshed when any context menu is clicked.
    Can you please let me know whether the RadAjaxManager settings are ok or not and why this problem occurs.

    Thanks.

  4. Pavlina
    Admin
    Pavlina avatar
    6187 posts

    Posted 04 Aug 2010 Link to this post

    Hello Kachy,

    Based on the supplied information, it is hard to determine what is causing the performance issue. However, to properly address the problem, it will be best if you open a formal support ticket, and send us a small working project, demonstrating your setup, and showing the unwanted behavior. We will debug it locally, and get back to you with more information on the matter.

    All the best,
    Pavlina
    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