Anomie has uploaded a new change for review. Change subject: Make jquery.tablesorter use a stable sort ......................................................................
Make jquery.tablesorter use a stable sort In r86337, jquery.tablesorter was changed from using the standard Javascript Array.sort to a custom merge sort, with the justification that it eliminates an eval and merge sort is stable. However, the implementation used is not, in fact, stable, and making an in-place merge sort stable reportedly kills performance. Instead, let's just go back to using Array.sort, but with a closure (basically the same comparison function used by the merge sort) rather than an eval and using the already-calculated "position" as a tiebreaker when two rows are otherwise equal to make it stable. Change-Id: Idc50127d3bfec2b1727f397a9780b359fd56055e --- M RELEASE-NOTES-1.20 M resources/jquery/jquery.tablesorter.js M tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js 3 files changed, 19 insertions(+), 49 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/38/15638/1 -- To view, visit https://gerrit.wikimedia.org/r/15638 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idc50127d3bfec2b1727f397a9780b359fd56055e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Anomie <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
