make attribute substring selectors a little faster
Categories
(Core :: CSS Parsing and Computation, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: heycam, Assigned: heycam)
References
Details
Attachments
(1 file, 1 obsolete file)
I use uBlock Origin. That inserts a style sheet with around 700 [href^=...]
selectors and 100 [href*=...]
. I accidentally took a Gecko profile with uBlock Origin enabled, and I noticed that on pages with many links, this can add a substantial amount of processing time. For example, on the HTML single page spec on my fast machine, we spend a total of 1.1 seconds under Gecko_AttrHasPrefix
during page load. It looks like a lot of that is refcount traffic on the string buffer that the nsAttrValue
holds. Adding functions to nsAttrValue
to do the substring matches so that we don't need to take a new reference to the string buffer saves 520 ms.
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
|
||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Comment 4•5 years ago
|
||
bugherder |
Assignee | ||
Comment 5•5 years ago
|
||
Comment 6•5 years ago
|
||
Comment on attachment 9151942 [details]
Bug 1640545 - Add perf-reftest-singleton for bug 1640545 changes.
Revision D76966 was moved to bug 1641108. Setting attachment 9151942 [details] to obsolete.
Description
•