简体   繁体   English

如何提高9,999行的DOM jquery DataTable的性能/速度?

[英]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. 对于'SEO'/客户端的原因,我必须运行DOM jquery数据表( http://datatables.net/index )而不是服务器端表。 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? 我试图解释这会导致性能下降但是想看看我是否可以采取任何步骤来改进9,999行的数据表的渲染? 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. 目前,大约需要6秒钟,并且会从渲染中挂起页面/标签。

Any suggestions (apart from going serverside/ajax)? 任何建议(除了服务器端/ 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. 也许一种方法是为“SEO”原因(在视口外移动)创建表的虚拟DOM渲染,然后使用JSON生成另一个用户实际交互的可见表。 JSON should be a lot faster. JSON应该快得多。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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