I have an ASP MVC4 application which loads a dashboard of widgets. Each widget executes an async ajax call back to the server and a partial is returned.
For some reason these widgets are taking aprox 50 seconds to replace the content with the partial. The ajax request is instant and executing the database query is also instant on the database side. Most of the time this works fine but I think it may be related to high usage of the site.
Can anyone recommend anything I can do to debug this issue or identify what the bottleneck could be?
$.ajax({
cache: true,
type: 'post',
async: true,
url: '/Overview/GetBillingWidget/',
success: function (result3) {
if (result3 == '') {
$('.widget-billing-container').replaceWith('');
} else {
$('.widget-billing').html(result3);
}
},
error: function () {
}
});
$.ajax({
cache: true,
type: 'post',
async: true,
url: '/Overview/GetQueryWidget/',
success: function (result3) {
if (result3 == '') {
$('.widget-myquery-container').replaceWith('');
} else {
$('.widget-myquery').html(result3);
}
},
error: function () {
}
});