Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    May 2009
    Location
    Bangalore
    Posts
    75
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Question Page taking too much time in updating the value.

    Hi All,

    I have created one page in php where in from drop down user can choose value and after clicking on the update button it is updated in db, there are so many fields and drop downs in the page but specifically for two drop downs values it is taking more than a min to update the value. I am making use of AJAX here and after clicking on the update button for the above mentioned fields user can scroll up and down the page and if he clicks on some other button then it throws some error.

    I have added below mentioned code also but still same problem.


    header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
    header('Cache-Control: no-store, no-cache, must-revalidate');
    header('Cache-Control: post-check=0, pre-check=0', FALSE);
    header('Pragma: no-cache');

    Can anyone tell how to fix this issue.Thanks in advance ...

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Is it a case where the UPDATE statement is gnarly? Or is it the communication from and to the server that is taking so much time?

    You should install and use the Firefox plugin Firebug to investigate-- every Ajax call is written to the console, including how much time it took, and a bunch of other helpful info.

    If the UPDATE statement is what is taking so long, you need to change your database design so you can take advantage of an index.

  • #3
    New Coder
    Join Date
    May 2009
    Location
    Bangalore
    Posts
    75
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Thanks for your response.

    The same code is deployed on two servers but it is creating trouble only in one server and the other one is working fine after greping the messages in the log file I have found that it is taking time only in those cases wherein after updating the value in DB the mail is sent. Actually my application sends back the response to the front page through AJAX once updation and mail is sent. So it is basically the mail server which is creating the trouble.

    If you can plz tell how to make the mail server somewhat faster so that the page has not to wait for 50 sec to load because it is loaded only when mail is sent. For confirmation I commented out the mail sending part in the code and it started working fine.

  • #4
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    I guess your network admins need to get their butts in gear and fix your mail server!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •