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
{{ message }}
This repository has been archived by the owner on Jun 10, 2021. It is now read-only.
queryAll can do better than https://github.com/josh/selector-set/blob/master/selector-set.next.js#L377:
instead of selecting all elements matching all rules in context, individual selectors may have up to 25 times better performance via getElementsBy*, which is O(c) - compared to best-case querySelectorAll O(n).
For some cases that can reduce queryAll complexity from O(rules * nodes) to O(rules * c).
The text was updated successfully, but these errors were encountered:
I did originally try that approach years and years ago when this was originally authored. But the compound selector did perform better. That said, browser engines have changed a lot since then so things may have changed.
This project is basically in maintenance mode after 6 years. I can't commit to making big algorithm changes at this point without a lot of testing.
queryAll
can do better than https://github.com/josh/selector-set/blob/master/selector-set.next.js#L377:instead of selecting all elements matching all rules in context, individual selectors may have up to 25 times better performance via
getElementsBy*
, which is O(c) - compared to best-casequerySelectorAll
O(n).For some cases that can reduce
queryAll
complexity from O(rules * nodes) to O(rules * c).The text was updated successfully, but these errors were encountered: