From 513d79f5d958a605fa0a9fee66a90450f91a5632 Mon Sep 17 00:00:00 2001 From: gorhill Date: Sun, 26 Apr 2015 01:02:35 -0400 Subject: [PATCH] just to keep track of findings re classList --- src/js/contentscript-end.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/js/contentscript-end.js b/src/js/contentscript-end.js index 67052b9b5..90c805181 100644 --- a/src/js/contentscript-end.js +++ b/src/js/contentscript-end.js @@ -618,6 +618,11 @@ var uBlockCollapser = (function() { var i = nodes.length; while ( i-- ) { node = nodes[i]; + // http://jsperf.com/enumerate-classes + // Chromium: classList a bit faster than manually enumerating + // class names. + // Firefox: classList quite slower than manually enumerating + // class names. vv = node.classList; if ( typeof vv !== 'object' ) { continue; } j = vv.length || 0;