Question

I'm using a template (Developr) which utilizes Modernizr. Also I use Tablesorter plugin. The thing is, if I disable Modernizr, sorting a table (2k+ rows) takes around 3 seconds. But template features don't work. With Modernizr enabled, sorting the same table takes more than 1 minute! Is there any way to speed up the process? (ie somehow prohibit tablesorter-modernizr interaction etc). Using latest versions of both plugins - Modernizr v2.7.1, Tablesorter v2.14.3

P.S. Sorting a table with 100 rows takes about same time no matter Modernizr is on or off (at least visually)

P.S.2 Even MouseOver (it is supposed to highlight a row in a table) on 2k rows table works with a noticable delay.

Timelines from Chrome:

Modernizr ON: https://www.dropbox.com/s/lurhmx3w7esi304/TimelineRawData-20131204T202607.json

Modernizr OFF: https://www.dropbox.com/s/l0o648nfij9pqnl/TimelineRawData-20131204T205035.json

<script src="js/libs/modernizr.custom.js"></script>

<script src="js/ts/js/jquery.tablesorter.js"></script>
<script src="js/ts/js/jquery.tablesorter.widgets.js"></script>
<script src="js/ts/js/jquery.tablesorter.widgets-filter-formatter.js"></script>
<script src="js/ts/js/jquery.metadata.js"></script>

<script id="js">$(function(){

$("#thetable").tablesorter({
  showProcessing: true,
  theme : 'green',
  widthFixed : true,
  widgets: [ 'reorder', 'zebra', 'stickyHeaders', 'filter' ],
  widgetOptions: {
  stickyHeaders : 'tablesorter-stickyHeader',
  stickyHeaders_cloneId : '-sticky',
  stickyHeaders_offset : 35,
  filter_startsWith : true,
  filter_searchDelay : 1000,
  zebra   : ["ui-widget-content even", "ui-state-default odd"],
  uitheme : 'green',
    }
    });
</script>
Was it helpful?

Solution

Patrick! Thank you very much for your help. Your tips led me to solution. Problem was in additional script, which was run by template. DOM changes watcher was set to true. So, when tablesorter was sorting table's rows one by one, that watcher was triggered every time - that's why so much garbage was there. Turning watcher to false solved the problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top