Reputation: 2313
I'm creating asp.net mvc 4 application, In that application I'm loading many rows to a table.
However this function working smoothly for small and average data sets which means if number of rows less to 1000 or less to 5000 this is loading with average time
This view of that table
But when the number of rows going high which means more than 5000 this take too much time to load those all rows into table
Here the LINQ query that is use to load values to table
public ActionResult StudentIndex()
{
return View(db._student.Where(x => x.Create_By == userid).OrderByDescending(s => s.Create_Date).ToList());
}
Here once it load values to table , using Jquery Table sorter function it is doing pagination function , I ignored sorting.
This is jquery script code snippet
<script type="text/javascript">
$(function () {
$("#table-hover")
.tablesorter({
widthFixed: true
})
.tablesorterPager({
container: $("#pager"),
size: $(".pagesize option:selected").val()
});
});
</script>
How can I speed up loading for large data-set ? what are the method should I follow?
Upvotes: 2
Views: 9608
Reputation: 3520
I suggest go by server side pagination :
http://www.codeproject.com/Articles/155422/jQuery-DataTables-and-ASP-NET-MVC-Integration-Part
OR
Working sample https://github.com/johannes-brunner/DataTables-ASP.NET-MVC
Upvotes: 3