The way things are set up right now, each class selector causes a has_class call, which will go looking for the "class" attribute. It sure would be nice if we either cached the result somewhere or coalesced multiple class simple selectors or something... Gecko doesn't have this problem, since it automatically coalesces class simple selectors into a single call to GetClasses followed by work with the resulting list-or-atom.
9 months ago
One idea to fix this is using an `ElementMatchingContext` or something like that, and pass it down to the loop where we go through the selector sequence. Shouldn't be too hard I think.
Yeah seems like we should just use an LRU cache for id and class, and stick that on the existing MatchingContext;
status-firefox57=wontfix unless someone thinks this bug should block 57
status-firefox57: --- → wontfix
You need to log in before you can comment on or make changes to this bug.