-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Currently, there are optimizations being done.
At least one optimization would be to determine if the selector contains is
just a simple id selector and use getElementById() if the element being
searched is the document root.
Another possibility is to do some indexing of the document before any
selectors are run on it so we can have more information about the document
a priori. Things like which elements have which classes and other common
attributes would be useful.
Also, currently nth-child and friends are slower than they need to be
because the index of an element is calculated during matching. It could
easily be calculated during iteration instead.
Metadata
Metadata
Assignees
Labels
No labels