I would recommend a javascript table library like DataTables. It includes sorting, filtering, and pagination options.
In addition, it has the functionality to cancel all the search calls, filtering, sorting, etc. that DataTables makes for the server. Javascript lib DataTables is just an event and display module. In this case, you can process any number of lines.
Thus, you will have all the necessary functionality, with ajax-y fast loading of data loaded into javascript using a scale to process any number of lines.
Server-side data processing with DataTables
source share