1
0
mirror of https://github.com/DataTables/DataTables.git synced 2024-11-29 11:24:10 +01:00

Performance: On destroy, don't select tbody elements for event removal

- Based on thread 17024 - if you have a large table with a lot of
  elements in the tbody, the find('*') selector was of course selecting
  them all. That results in poor performance. DataTables doesn't add any
  events to the children in the tbody, so we can filter out those
  elemetns and keep the element list ot  a sensible size.
This commit is contained in:
Allan Jardine 2013-08-23 10:11:42 +01:00
parent 4d6081c3d2
commit e61e402e37
2 changed files with 2 additions and 2 deletions

View File

@ -1 +1 @@
e7fe17ae3c694b0af5e5a7c710eb775e19794fc8
ce1dba44a5f89db2aeaa390cc2f3f0c61adf350d

View File

@ -8355,7 +8355,7 @@
}
// Blitz all DT events
jqWrapper.unbind('.DT').find('*').unbind('.DT');
jqWrapper.unbind('.DT').find(':not(tbody *)').unbind('.DT');
$(window).unbind('.DT-'+settings.sInstance);
// When scrolling we had to break the table up - restore it