Need best way to display 50000 records in table in one second

Hi. I have to display the table with 50000 records. Which is the best way to show the data in a second. I am using sheidui.js for displaying the records. I am able to display data in 10 seconds. But I would like to show in 1 second. Is it possible?

If possible please suggest me ideas (or) examples.

Thanks in Advance



66.8k

if possible store the html in a cache file, so for example the 2nd person who enter that page and gonna see the same results, not do do a query, just to display the saved html file

edited 15d ago

The problem is obviously the DOM and html itself. Don't put all 50000 records in html, it will kill all browsers maybe except lynx. You need to display in html like 100 records once, and update in js, there are libraries for this kind of thing like virtual score.

On server side just use maybe some cache if you have enough ram.

https://github.com/tbranyen/hyperlist - for example you have library there

If you don't need order, filters, etc. from server. You can generate html table and put it in a file after any create/modify/delete operation even you can have a gzipped version. Then with javascript like datatables.net you can add other funtionalities

As i wrote - putting 50000 elements in dom will kill all major browsers. He needs to use some js to handle this case.

and if you write a json and the create the table? do you think in an infinit table scroll?

Infinite scroll will still add all elements to dom. After some scrolling it will slow down. He needs to use virtual scroll for sure.

I already used datatables.net but after some scrolling it's slowing down
>If you don't need order, filters, etc. from server. You can generate html table and put it in a file after any create/modify/delete operation even you can have a gzipped version. Then with javascript like datatables.net you can add other funtionalities

Hi if there is any sample example for virtual scroll could please provide it. Thank you >Infinite scroll will still add all elements to dom. After some scrolling it will slow down. He needs to use virtual scroll for sure.

There are examples in link i posted.

50000 rows listed on single view is simply not suitable for human usage. For machine use - perhaps, but then you can use different transport medium.