Last Comment Bug 749075 - Improve performance of display list construction, ComputeVisibility and layer construction
: Improve performance of display list construction, ComputeVisibility and layer...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Layout (show other bugs)
: Trunk
: x86_64 Windows 7
: -- normal (vote)
: mozilla15
Assigned To: Robert O'Callahan (:roc) (Exited; email my personal email if necessary)
:
Mentors:
Depends on: 760002 763451
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-25 22:26 PDT by Robert O'Callahan (:roc) (Exited; email my personal email if necessary)
Modified: 2012-06-11 05:51 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Part 1: Refactor the nsDisplayItem API for testing whether the item needs to be rendered to a transparent surface (29.53 KB, patch)
2012-04-25 22:49 PDT, Robert O'Callahan (:roc) (Exited; email my personal email if necessary)
matt.woodrow: review+
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 (4.57 KB, patch)
2012-04-25 22:55 PDT, Robert O'Callahan (:roc) (Exited; email my personal email if necessary)
matt.woodrow: review+
Details | Diff | Review

Description Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2012-04-25 22:26:43 PDT
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.
Comment 1 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2012-04-25 22:49:14 PDT
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
Comment 2 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2012-04-25 22:55:26 PDT
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.
Comment 3 Matt Woodrow (:mattwoodrow) 2012-04-26 14:29:38 PDT
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?
Comment 4 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2012-04-26 15:13:46 PDT
(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.
Comment 5 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2012-05-02 21:35:05 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/ec2bba7d11b4
Comment 6 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2012-05-02 21:35:29 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/82531cc259b3

Note You need to log in before you can comment on or make changes to this bug.