Closed Bug 547538 Opened 11 years ago Closed 11 years ago

Work around border rendering performance issues in order to make the location and searchbar restyle landable

Categories

(Firefox :: Theme, defect)

All
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mstange, Assigned: mstange)

References

Details

(Keywords: perf)

Attachments

(1 file)

Attached patch v1Splinter Review
This patch is on top of the patches in bug 482086 and bug 482105.

I've profiled window painting with those patches and found out that rendering the borders was the largest performance problem. So this patch gets rid of the borders: The textbox gets a dark background and 1px padding, and the things inside the textbox get a white background that overlays the dark background of the textbox.
I've also replaced the gradient images with real gradients and got rid of all shadow blurring except for the focus ring and the pressed states.

I've introduced one small visual change: The textboxes' inner shadow is a little less opaque. This matches the new mockups.

Tryserver perf numbers look good.

I'll create a separate bug for the Gecko border drawing slowness.
Attachment #428038 - Flags: review?(dao)
Comment on attachment 428038 [details] [diff] [review]
v1

feel free to land my two patches together with this
Attachment #428038 - Flags: review?(dao) → review+
Perhaps some comments surrounding the css detailing why this is absolutely necessary to stay like that until bug XXX is landed for perf reasons?
http://hg.mozilla.org/mozilla-central/rev/43ddaf1ead22

(In reply to comment #2)
> Perhaps some comments surrounding the css detailing why this is absolutely
> necessary to stay like that until bug XXX is landed for perf reasons?

Yeah, I'll add them when I've filed the bug.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
OK, looks like there still is a 1% Txul regression (from 253.5ms to 255ms)...
I'll expect that to go away after the tab bar restyle.

Shark says that drawing the tab borders is much more worthy of optimization than drawing the location and search bar.
Depends on: 547591
So apparently the real problem was that we weren't resetting -moz-border-*-colors and thus suffering from bug 547591. I should have applied the patch from bug 482692 before profiling...
Tomorrow I'll test whether that makes using borders viable.
You need to log in before you can comment on or make changes to this bug.