jquery-datatables-checkboxes
jquery-datatables-checkboxes copied to clipboard
Performance problem on search when deferRender is enabled
Hello.
I have a performance problem on I set the deferRender
and and typing in the search field, I have a performance problem with many records, and the select
trigger is fired every time the search field changes.
Example on https://jsfiddle.net/8ccdbcyt/
- select all records with names beginning with "B"
- typ in search field B, R, E, A
- see the console log
PS: if I comment the deferRender
parameter, the program works ok.
PS2: performance problem occour with many records (in my case (not in the example above), 400 records)
PS3) without the checkboxes extension, the select
trigger isn´t fired
Thanks for reporting this issue.
You are correct, this is how plug-in works now. When deferRender
is set to true
, it will trigger select
event on every redraw for each selected checkbox.
However I see your point and will work to find a possible resolution.
Plug-in fires select
event only for current page only, this should not be a big effect on performance.
This is needed because in deferred rendering mode row nodes are created on the fly by jQuery DataTables on page change. Checkboxes plug-in need to make sure that checkboxes/rows are rendered properly after the redraw.