Open
Bug 1365475
Opened 8 years ago
Updated 2 years ago
stylo: Complex selectors with multiple class selectors end up doing multiple FFI calls to get the class attr
Categories
(Core :: CSS Parsing and Computation, enhancement, P4)
Tracking
()
NEW
Tracking | Status | |
---|---|---|
firefox57 | --- | wontfix |
People
(Reporter: bzbarsky, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: perf)
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.
Comment 1•8 years 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.
Comment 2•8 years ago
|
||
Yeah seems like we should just use an LRU cache for id and class, and stick that on the existing MatchingContext;
Updated•8 years ago
|
Blocks: stylo-perf
Priority: -- → P4
Comment 3•7 years ago
|
||
status-firefox57=wontfix unless someone thinks this bug should block 57
status-firefox57:
--- → wontfix
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•