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)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 63
Tracking Status
firefox63 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(1 file)

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.
Attached patch Patch (deleted) — Splinter Review
Attachment #8995960 - Flags: review?(gijskruitbosch+bugs)
Assignee: nobody → florian
Status: NEW → ASSIGNED
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.
Priority: -- → P1
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.

Attachment

General

Created:
Updated:
Size: