Reputation: 1720
I am using this code
$.ajax({
type: "GET",
url: "CSProcessing.aspx/ReadyRTicketsForSale",
contentType: "application/json; charset=utf-8",
data: "{ 'reservationNo' : '" + resNo +
"'}",
dataType: "json",
success: rloadticketsS,
});
This code returns result correctly but very slow i want fast execution. Please give any suggestion any suggestion. Thanks in advance
Upvotes: 2
Views: 4113
Reputation: 1651
there are several tips that you must doing for fast execution.
for example: compress your .js file, quality source code and Sql query in the server side. also, you can link to these links in follow instead of use js lib in your page:
1. Google Ajax API CDN – http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js
2. Microsoft CDN – http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.6.2.min.js
3. jQuery CDN – http://code.jquery.com/jquery-1.6.2.min.js
Upvotes: 1
Reputation: 6536
Your code hasn't anything to do with the Javascript - Its your server that's responding slowly.
Make sure its not getting stuck in loops longer than it needs to, etc. make sure your server is configured correctly, THEN crack open the profiler.
Upvotes: 4