Closed
Bug 1479426
Opened 6 years ago
Closed 6 years ago
The CSS selector showing pageActionSeparator is pretty inefficient
Categories
(Firefox :: Address Bar, enhancement, P1)
Firefox
Address Bar
Tracking
()
RESOLVED
FIXED
Firefox 63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: florian, Assigned: florian)
References
Details
Attachments
(1 file)
(deleted),
patch
|
Gijs
:
review+
|
Details | Diff | Splinter Review |
https://searchfox.org/mozilla-central/rev/033d45ca70ff32acf04286244644d19308c359d5/browser/themes/shared/urlbar-searchbar.inc.css#216
See bug 1260036 comment 15.
The current selector is:
:not(#pageActionSeparator):not([hidden]) ~ #pageActionSeparator
This rule is re-evaluated with some (tiny) amount of processing each time an id or hidden attribute is changed on any node in the document.
The :not(#pageActionSeparator) part seems useless as we have a single element with the id pageActionSeparator.
Emilio told me that for any `hidden` attribute change we need to walk all the siblings of the element on the next flush (to see if any is `#pageActionSeparator`).
By adding #page-action-buttons > at the beginning of the selector we can avoid the walk of sibling nodes for "hidden" attribute changes on nodes that are not children of the #page-action-buttons node.
Without having seen this in a profile, I'm not going to pretend this is a performance bug, but fixing it seems to be an improvement anyway.
Assignee | ||
Comment 1•6 years ago
|
||
Attachment #8995960 -
Flags: review?(gijskruitbosch+bugs)
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → florian
Status: NEW → ASSIGNED
Comment 2•6 years ago
|
||
Comment on attachment 8995960 [details] [diff] [review]
Patch
Review of attachment 8995960 [details] [diff] [review]:
-----------------------------------------------------------------
rs=me
Attachment #8995960 -
Flags: review?(gijskruitbosch+bugs) → review+
Pushed by florian@queze.net:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3db40ff608eb
improve the efficiency of the CSS selector showing pageActionSeparator, rs=Gijs.
Updated•6 years ago
|
Priority: -- → P1
Comment 4•6 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
You need to log in
before you can comment on or make changes to this bug.
Description
•