Closed Bug 962640 Opened 11 years ago Closed 6 years ago

Temporarily reduce the number of box shadows during customization transition

Categories

(Firefox :: Toolbars and Customization, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: mconley, Assigned: mconley)

References

Details

(Whiteboard: [Australis:P-])

Attachments

(1 file)

Looking at a reflow profile, we spend quite a bit of time drawing inner box shadows on the URL bar and search bar (about 132ms and 47ms respectively). Hiding these box shadows during the transition could be a really cheap win for customization transition performance.
Going to start here...
Assignee: nobody → mconley
I whipped up a patch to remove the box-shadows on the URL bar and the search input, and a comparison reflow profile saw what might be a 10ms win on painting. That's really small fries right now. I'm not going to WONTFIX this bug, but I'm going to see if I can find some bigger fish. I'll post my patch in a second.
Attached patch Patch v1 (deleted) — Splinter Review
Here's a list of visible things that have box-shadow's during the transition on Windows 7: TabsToolbar:before, nav-bar, customization-titlebar-visibility-button, customization-toolbar-visibility-button, customization-reset-button, panel-arrowcontent, PanelUI-footer, PanelUI-footer-inner
I'm curious to know how much the box-shadow that's creating the Windows Aero glass fog is playing into this. Preliminary local tests suggest it's a non-trivial amount, but I've pushed to Try to see if I can get a more definitive answer. Baseline: https://tbpl.mozilla.org/?tree=Try&rev=9d601acf25f2 Patch to remove fog: https://tbpl.mozilla.org/?tree=Try&rev=a4f1199e12d3 If taking out the fog puts a nice dent in our CART results, we might be able to use an image for the fog - at least during the customize mode transition (see bug 908067).
Here's a list of things with box-shadows that includes anonymous content: "TabsToolbar:before,nav-bar,toolbarbutton-icon,toolbarbutton-icon,toolbarbutton-icon,toolbarbutton-menubutton-dropmarker:before,dropmarker-icon,toolbarbutton-icon,toolbarbutton-icon,toolbarbutton-icon,toolbarbutton-icon"
Retargeting for Windows, since this is where performance hurts the most - though I can easily see us doing this on OS X if needs be.
OS: Mac OS X → Windows 7
Ok, I've salvaged MattN's work from bug 908067, and used shorlander's newer images. Right now I'm just using the static fog image during the customize mode transition, but who knows - we might want it for the normal fog as well, since box-shadows are slow as molasses. Anyhow, here's a try push for comparing: Baseline: https://tbpl.mozilla.org/?tree=Try&rev=fa48d6ebc486 Static fog patch: https://tbpl.mozilla.org/?tree=Try&rev=28c131a7990c Compare-talos: http://compare-talos.mattn.ca/?oldRevs=fa48d6ebc486&newRev=28c131a7990c&server=graphs.mozilla.org&submit=true
Here's a distilled profile of just the customize mode enter transition (3 enters): http://people.mozilla.org/~bgirard/cleopatra/#report=8a51b9a8ecf10789eca95fd280cd11c1c0f08f46 Just so it's clear how much box-shadows are contributing here, it looks like 114 samples were gathered inside nsDisplayBoxShadowOuter::Paint, which is about 38 samples per each enter of customize mode. Using the static fog image, I got 94 samples gathered in nsDisplayBoxShadowOuter::Paint - so my original hypothesis that the static fog was responsible for the majority of the box shadow cost appears to have been incorrect.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: