i have ajax calls to server, that returns processed json data. To speed things up i need them to be executed at the same time.
Problem: I get executed and returned only one request at the time
As you can see, there is response times that almost doubles each time, but data sent always the same. If i understand corectly, there must be all call times eg 15,47s. aJax:
$.each([76, 76, 76, 76], function(){
$.ajax({
url: 'index.php?r=report/generateReport',
type: 'post',
dataType: 'json',
data:{ ... },
async: true,
success: function(json){
....
}
});
console.log('done');
});
Do you use sessions? Then it's the session locking. Call session_write_close()
as soon as possible.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.