From ce59c7403f67ab2cb4d9b8e812aba58ef5e37d13 Mon Sep 17 00:00:00 2001 From: Tim Tucker Date: Fri, 31 Aug 2012 16:25:35 -0300 Subject: [PATCH] Update media/src/core/core.scrolling.js Tweaks to improve performance Cache nodes Restructure to use nextSibling rather than childNodes (small increase in file size, but may be a slight decrease in minified size) --- media/src/core/core.scrolling.js | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/media/src/core/core.scrolling.js b/media/src/core/core.scrolling.js index 3b3af823..a06ecaef 100644 --- a/media/src/core/core.scrolling.js +++ b/media/src/core/core.scrolling.js @@ -1,5 +1,4 @@ - /** * Add any control elements for the table - specifically scrolling * @param {object} oSettings dataTables settings object @@ -484,27 +483,31 @@ function _fnScrollDraw ( o ) */ function _fnApplyToChildren( fn, an1, an2 ) { - var index=0, - i, iLen, j, jLen; + var index=0, i=0, iLen=an1.length; + var nNode1, nNode2; - for ( i=0, iLen=an1.length ; i