简体   繁体   中英

How to improve performance/speed of DOM jquery DataTable with 9,999 rows?

for 'SEO'/client reasons, I have to run with a DOM jquery datatable ( http://datatables.net/index ) rather than a server side table. I've tried to explain that this is going to cause a performance drain but wanted to see if there are any steps I can take to improve the rendering of a datatable with 9,999 rows? I require the sorting on all columns as well. At the moment, it's taking around 6 seconds and hangs the page/tab from rendering.

Any suggestions (apart from going serverside/ajax)?

Thanks, David

Perhaps an approach would be to create a dummy DOM rendering of the table for the "SEO" reasons (moved outside the viewport) and then another visible table generated with JSON with which the user actually interacts. JSON should be a lot faster.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM