Profile UI Performance to find bottlenecks and low hanging fruit for optimization

RESOLVED INCOMPLETE

Status

defect
RESOLVED INCOMPLETE
6 years ago
2 years ago

People

(Reporter: ally, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [defect] p=0)

(Reporter)

Description

6 years ago
We have a whole bunch of descendant selectors, which are very expensive and very bad for performance. 

We should try to purge platform.css of all of them.
The highest-priority ones are where the principal selector is very broad and does not use a class or ID, for example:
http://hg.mozilla.org/mozilla-central/file/0a91da5f5eab/browser/metro/theme/platform.css#l362

That one is really bad because the cost of matching the descendant selector will be incurred for every <description> element in the entire app.  When the principal selector is narrower, like this, the cost is much more limited and we should fix it only if it won't make our code much more fragile or complex:

http://hg.mozilla.org/mozilla-central/file/0a91da5f5eab/browser/metro/theme/platform.css#l366

Updated

6 years ago
Component: General → Theme
I think this is a good bug to do but I don't think it belongs in any story and I don't think it causes any human-noticeable jank, so I'm going to remove it from v1 triage. But feel free to work on it when you have time.
No longer blocks: metrov1triage
No longer blocks: metrov2planning
Whiteboard: [defect] p=0
I'm re-titling this bug. Changing selectors may or may not be a useful performance optimization, and may incur maintenance and reuse-potential costs. First we need to identify problems before prescribing fixes, so I suggest we use this bug for that work.
Summary: Death to Descendant Selectors → Profile UI Performance to find bottlenecks and low hanging fruit for optimization
Mass close of bugs in obsolete product https://bugzilla.mozilla.org/show_bug.cgi?id=1350354
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.