The default bug view has changed. See this FAQ.

Improve performance of display list construction, ComputeVisibility and layer construction

RESOLVED FIXED in mozilla15

Status

()

Core
Layout
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: roc, Assigned: roc)

Tracking

Trunk
mozilla15
x86_64
Windows 7
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

We do this a lot and it shows up on mobile profiles. I'm using the test patch here:
https://bugzilla.mozilla.org/show_bug.cgi?id=735898#c1
and profiling a saved version of cnn.com.
Created attachment 618565 [details] [diff] [review]
Part 1: Refactor the nsDisplayItem API for testing whether the item needs to be rendered to a transparent surface
Attachment #618565 - Flags: review?(matt.woodrow)
Created attachment 618566 [details] [diff] [review]
Part 2: Skip the guts of Accumulate if we're adding a display item in an area of the layer that's already opaque and visible

In my test this improves perf from around 25s to around 22s.
Attachment #618566 - Flags: review?(matt.woodrow)
Comment on attachment 618565 [details] [diff] [review]
Part 1: Refactor the nsDisplayItem API for testing whether the item needs to be rendered to a transparent surface

Review of attachment 618565 [details] [diff] [review]:
-----------------------------------------------------------------

::: layout/base/nsDisplayList.h
@@ +501,5 @@
> +      // Web pages or extensions could trigger this by using
> +      // -moz-appearance:win-borderless-glass etc on their own elements.
> +      // Keep the first one, since that will be the background of the root
> +      // window
> +      NS_WARNING("Multiple glass backgrounds found?");

Does this need to be a warning if it can be hit by website code?
Attachment #618565 - Flags: review?(matt.woodrow) → review+
Attachment #618566 - Flags: review?(matt.woodrow) → review+
(In reply to Matt Woodrow (:mattwoodrow) from comment #3)
> ::: layout/base/nsDisplayList.h
> @@ +501,5 @@
> > +      // Web pages or extensions could trigger this by using
> > +      // -moz-appearance:win-borderless-glass etc on their own elements.
> > +      // Keep the first one, since that will be the background of the root
> > +      // window
> > +      NS_WARNING("Multiple glass backgrounds found?");
> 
> Does this need to be a warning if it can be hit by website code?

Yes. Warnings can be hit by website code.
http://hg.mozilla.org/integration/mozilla-inbound/rev/ec2bba7d11b4
http://hg.mozilla.org/integration/mozilla-inbound/rev/82531cc259b3
https://hg.mozilla.org/mozilla-central/rev/ec2bba7d11b4
https://hg.mozilla.org/mozilla-central/rev/82531cc259b3
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
Depends on: 760002

Updated

5 years ago
Depends on: 763451
You need to log in before you can comment on or make changes to this bug.