1

So i am using Brunch as a framework for the front end of a web application.

And what I am doing is drawing each row of a table as a view and then converting the table to datatables.

I need to have each row as a view for certain ui reasons.

However, performance slows down considerably after 1000 rows.

any ideas of how i can do some kind of clever pagination or defer drawing each row of the table until later or some other idea where i can still have each row of the table as a separate view.

4

1 回答 1

2

是的,bDeferRender在您的选项中使用 - :

bDeferRender: true

文档

当您为表使用 Ajax 或 JS 数据源时,延迟渲染可以为 DataTables 提供巨大的速度提升。此选项设置为 true 时,将导致 DataTables 推迟为每一行创建表格元素,直到绘制需要它们 - 节省大量时间。

对我来说,它在通过 ajax 或“本机”插入行时都有效(表是静态的)。使用bDeferRender.

于 2013-10-18T21:28:31.047 回答