-2

I'm making very simple ajax requests like

 $.ajax({  
   type: "POST",  
   url: "atuamae.org/send.php",  
   data: dataString,  
   success: function() {  
    //display message back to user here  
    $('#message').val('');
   }  
 });  

and then this php sends it to the database, but this process is taking too long! what can i do to speed it up?

I have some $_SESSION variables inside the php could that be slowing it down?

coiso
  • 7,151
  • 12
  • 44
  • 63
  • 2
    This has nothing to do with the client code and everything to do with how your server is configured and written. – jfriend00 Dec 02 '11 at 01:07
  • test it. Comment out the code that does the work, return dummy data, time it. Slowly add work back into the script, keep timing it, find out what is taking the time. – seanb Dec 02 '11 at 01:27

1 Answers1

0

You can profile your php code to find out if the bottle neck is in the code. Simplest way to profile a PHP script

Are you sure it's in PHP?? I'd assume it is from latency.

Community
  • 1
  • 1
dm03514
  • 54,664
  • 18
  • 108
  • 145