Skip to content

Commit

Permalink
highlighter: remove redundant (?) call to $.show()
Browse files Browse the repository at this point in the history
I don't understand why this would be necessary -- the element's just
been created, no style is (presumably) changing its display to anything
other than the default... -- and when highlighting all text in a 5000×3
table, $.show() accounts for 10s out of the 14s it takes to draw the
highlights.

$.show() being absurdly slow is a known problem:
jquery/jquery.com#88
  • Loading branch information
wjt committed Apr 30, 2015
1 parent 5015d2d commit 824e6d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui/highlighter.js
Expand Up @@ -34,7 +34,7 @@ function highlightRange(normedRange, cssClass) {
var node = nodes[i];
if (!white.test(node.nodeValue)) {
results.push(
$(node).wrapAll(hl).parent().show()[0]
$(node).wrapAll(hl).parent()[0]
);
}
}
Expand Down

0 comments on commit 824e6d6

Please sign in to comment.