You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can just remove this line. Or do something more complex (like marking cache as filter-only).
You can say "hey, that's just a 15 ms!". But that's much slower on mobile (for example 10 ms vs 150 ms) or when there's many selectors or selectors are complex.
Anyway, why not to use querySelectorAll in cases when we can use it.
The text was updated successfully, but these errors were encountered:
gibson042
added a commit
to gibson042/sizzle
that referenced
this issue
Nov 21, 2016
Steps to reproduce
$('any selector').filter('a, div')
(useless but it's just an example).$('a, div')
and sizzle wouldn't use querySelectorAll!That happends because there compilerCache exists for that selector (it was cached when we called filter).
Example: http://jsbin.com/qidopuhiro/1/edit?js,console,output
1 ms vs 15 ms in my case (desktop).
Why that happends?
See
sizzle/src/sizzle.js
Line 295 in abde99f
We can just remove this line. Or do something more complex (like marking cache as filter-only).
You can say "hey, that's just a 15 ms!". But that's much slower on mobile (for example 10 ms vs 150 ms) or when there's many selectors or selectors are complex.
Anyway, why not to use querySelectorAll in cases when we can use it.
The text was updated successfully, but these errors were encountered: