Page view counter

Ajax is very slow in Production Server

Last post 10-07-2007 4:32 PM by Luis Abreu. 9 replies.

Sort Posts:

  • Ajax is very slow in Production Server

    03-24-2007, 1:07 AM
    • Loading...
    • SMuhilan
    • Joined on 02-24-2007, 3:44 AM
    • Posts 22
    • Points 3

    hi

    I designed a small project. In this project I have two aspx form and one usercontrol.

    1. formItemSelected.aspx
    2. formItemSearch.aspx
    3. uctrItemSearch.ascx - usercontrol

    In the usercontrol, I have a html listbox control with runat server (lstItemSelected) and visible =false and a IFrame with src=formitemsearch.aspx. a button called CLOSE for setting visible =false and also raise the event called btnclicked

    formItemSearch.aspx contians a text box ( for item name), a button (for search) and a gridview control with a check box column.
    The gird will display data as per the item name given in the text box when search button clicked.

    Below this grid, I have two more buttons (Down , Up) and a grid witch checkbox.

    User will select the items in the first gridview by checking checkboxes. then they press down for pushing items to second gridview. Up is used for deleting checked row in the second row.

    I have a html listbox control with runat server (lstItemSelected) and visible =false. I fill this list box whenever there is a change in the second grid.

    The entire form is in updatepanel with conditionaly postback, the updatepanel assyncpostbacktriggers are the down, up, search click events.

    I have a javascript method called LoadSelectedItem() which will fill all the items from lstItemSelected into usercontrol's lstItemSelected listbox.

    function LoadSelectedItem()

    {

    var List1=document.getElementById("lstItemSelected");

    var List2=parent.document.getElementById("LookUpControl_lstItemSelected");

    while(List2.options.length>0)

    {

    var i=0;

    List2.remove(i);

    }

    for(i=0;i<List1.options.length;i++)

    {

    var option1=document.createElement("OPTION");

    option1.text=List1.options[i].text;

    option1.value=List1.options[i].value;

    option1.selected=

    true;

    List2.add(option1);

     

     

    }

     

    }

    I called the above method on the click of down and up button using scriptmanager.registerscript method. 

    formItemSelected.aspx contains a button and a grid view control.
    When I click, the button, the usercontrol will display and user can search the items and select the items, when the press CLOSE button in the usercontrol, this usercontrol is hidden and the I display the data in the grid by reading lstselecteditem of the usercontrol.

    My problem is all the functions are running fine, in my development PC with fast. But while on production Server, it works fine but pushing from upper gridview to lower grid is slow.

    The items are not more than 10.

    I put scriptmanager script mode=release and also commenting the javacript method calling from the server side. But no use. Its still takes the same amount of time.

    Why?

    I didn't install AJAX on my server since it is shared one.

    Why generaly AJAX 1.0 is very very slow on Production server and fast in the local development PC.

    Very urgent.

    replay to me.

    S. Muhilan
    Mumbai, India 

     

    Filed under:
  • Re: Ajax is very slow in Production Server

    03-24-2007, 6:16 AM
    • Loading...
    • spvlong
    • Joined on 04-17-2006, 2:29 AM
    • Posts 187
    • Points 1,025

    Hi Muhilan,

    Make sure that

    <compilation debug="false"> is in your web.config. This will improve AJAX performance a lot.

     

    Hope this helps,

    www.stockbiz.vn
    The Vietnamese Stock Market and Economy
  • Re: Ajax is very slow in Production Server

    03-26-2007, 7:18 AM
    • Loading...
    • SMuhilan
    • Joined on 02-24-2007, 3:44 AM
    • Posts 22
    • Points 3

    Hi,

    Thanks for your reply.
    I already try this option also. But no improvement.
    Is it necessary to install AJAX framework in our Webserver?

  • Re: Ajax is very slow in Production Server

    03-26-2007, 9:24 AM
    • Loading...
    • spvlong
    • Joined on 04-17-2006, 2:29 AM
    • Posts 187
    • Points 1,025

    Hi SMuhilan,

    The ASP.Net AJAX Extensions must be installed before you can run your AJAX application. Your application is running now so I don't think that you need to reinstall the ASP.Net AJAX Extensions.

    www.stockbiz.vn
    The Vietnamese Stock Market and Economy
  • Re: Ajax is very slow in Production Server

    03-28-2007, 10:26 AM
    • Loading...
    • SMuhilan
    • Joined on 02-24-2007, 3:44 AM
    • Posts 22
    • Points 3

    Hi,

    Is there any solution for my problem?

  • Re: Ajax is very slow in Production Server

    06-21-2007, 12:17 PM
    • Loading...
    • jungleboy6
    • Joined on 06-21-2007, 4:16 PM
    • Posts 8
    • Points 3

     Did you ever find an answer....same issue here too.

  • Re: Ajax is very slow in Production Server

    07-19-2007, 11:39 AM
    • Loading...
    • bobthecoder
    • Joined on 03-06-2007, 3:19 AM
    • Posts 5
    • Points 10

    mmm, I have the opposite problem. Possibly worthy of a new thread but could be the same cause - but just machine based. I'm finding moving something between grids takes less than 2 seconds in production and my production server is 2500km away, whereas working on my localhost takes about 8 seconds and its all on my laptop, which isn't quite as fast as the production server, but its not normally this slow. Both are win2k3 and same data and database. I've tried setting scriptsmanager to release mode and turning off debug but no difference. It makes development a bit slower and more painful but at least its going to work in production. Wish I knew what was going on here.

    When I run perfmon on local machine when running app locally the CPU goes nuts. However when I view the perfmons for server and local host while viewing the production server, its pretty much flat line. So I don't know what it is about the site that is causing my local CPU to work overtime. It doesn't seem to be the rendering. Unless there is some kind of contention going on my laptop

    Rob

  • Re: Ajax is very slow in Production Server

    07-19-2007, 5:20 PM
    Answer
    • Loading...
    • KaziManzurRashid
    • Joined on 03-09-2003, 3:04 PM
    • Dhaka, Bangladesh
    • Posts 882
    • Points 4,782

    Just make sure you have the following setting in web.config when deploying in production server: 

    <compilation debug="false">
    
    <system.web.extensions>
        <scripting>
            <scriptResourceHandler enableCompression="true" enableCaching="true"/>
        </scripting>
    </system.web.extensions>
    Long Live .NET
    Kazi Manzur Rashid (Amit)
    _________________________
    Web: http //dotnetshoutout.com
    Blog: http://weblogs.asp.net/rashid
    Twitter: http://twitter.com/manzurrashid
  • Re: Ajax is very slow in Production Server

    10-07-2007, 5:11 AM
    • Loading...
    • power9888
    • Joined on 08-10-2006, 4:03 AM
    • Posts 7
    • Points 7

    I have the same issue here.  Ajax in .net runs very very slow.  The setting in web.config

    <compilation debug="false">

    <system.web.extensions>
        <scripting>
            <scriptResourceHandler enableCompression="true" enableCaching="true"/>
        </scripting>
    </system.web.extensions>

    does no help at all.

     Any other suggestion to resolve this issue?

    Dot Net Learner
  • Re: Ajax is very slow in Production Server

    10-07-2007, 4:32 PM
    • Loading...
    • Luis Abreu
    • Joined on 02-12-2005, 1:22 AM
    • Madeira [Portugal]
    • Posts 5,368
    • Points 25,660
    hello guys. well, to be honest, the updatepanel does have some limitations, specially when you have lots of elements (which doesn't seem to be the case). another thing you should check is if you ahve a big viewstate on that page. if taht is the case, then you should try to disable it and see itimproves the performance of your page. btw, you surelly must have ASP.NET AJAX extensions installed on your server or your ajax pasge wouldn't work...
    --
    Regards,
    Luis Abreu
    email: labreu_at_gmail.com
    EN blog:http://msmvps.com/blogs/luisabreu
Page 1 of 1 (10 items)