简体   繁体   English

jQuery DataTables具有单独的列选择过滤器和大量行的性能

[英]jQuery DataTables performance with individual column select filters and large number of rows

I currently have a client-sourced table with individual column select drop-downs that work amazing. 我目前有一个客户端源表,其中单独的列选择下拉列表工作惊人。 I have about 1000 rows and the performance is great. 我有大约1000行,性能很好。 Amazing jQuery plug-in. 惊人的jQuery插件。 Problem : my client just told me that this could grow to upwards of 40000 in a month. 问题 :我的客户刚刚告诉我,这可能会在一个月内增长到40000以上。 My client also told me that they really like the individual select filters in the footers and I can't remove them. 我的客户还告诉我,他们真的很喜欢页脚中的个别选择过滤器,我无法删除它们。 Hence, I am worried about performance. 因此,我担心表现。 See here if you don't know what I'm talking about when I say individual select filters: 如果你说个别选择过滤器时你不知道我在说什么,请看这里:

https://datatables.net/examples/api/multi_filter_select.html https://datatables.net/examples/api/multi_filter_select.html

I was poking around and I saw the example here using client side and deferred rendering: 我正在四处寻找,我在这里看到了使用客户端和延迟渲染的示例:

https://datatables.net/extensions/scroller/examples/initialisation/large_js_source.html https://datatables.net/extensions/scroller/examples/initialisation/large_js_source.html

But the issue is I don't believe I can use deferred rendering since the client wants the individual column select filters. 但问题是我不相信我可以使用延迟渲染,因为客户端需要单独的列选择过滤器。 I have to load up all the data for the select filters to even work... 我必须加载选择过滤器的所有数据才能工作......

Does anyone have any idea how I can accomplish this behavior of individual column filtering with good speed at high number of rows or suggest a reasonable alternative? 有没有人知道如何在高行数下以良好的速度完成单个列过滤的这种行为或建议一个合理的替代方案? I feel like I am reaching the limitations of the software/browser here... 我觉得我在这里达到了软件/浏览器的局限性......

Thanks! 谢谢!

Julian 朱利安

40000 rows of data is a lot, just to be transferred from server to browser. 40000行数据很多,只是从服务器传输到浏览器。 It will slow down page load. 它会减慢页面加载速度。

I would execute filter on server side, and output only first (say 1000) rows, so they can be more manageable for the browser, and saves a lot of bandwidth. 我会在服务器端执行过滤器,并仅输出第一行(比如1000行),因此它们对浏览器更易于管理,并节省了大量带宽。 But that also means more JavaScript and SQL coding. 但这也意味着更多的JavaScript和SQL编码。

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

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