Closed Bug 1368386 Opened 2 years ago Closed 2 years ago

Invalidating many elements is slow

Categories

(Core :: Web Painting, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

(Blocks 1 open bug)

Details

Attachments

(6 files)

This testcase is an augmented version of https://people-mozilla.org/~jmuizelaar/implementation-tests/dl-test.html that invalidates all elements on every frame.

Profile: https://perfht.ml/2rbfPax

We spend a lot of time in ClientTiledPaintedLayer::InvalidateRegion, due to this line:

> mValidRegion.Sub(mValidRegion, mInvalidRegion.GetRegion());

Recomputing mValidRegion on every single call is wasteful. We should find a way to skip this step until mValidRegion is actually needed.
Assignee: nobody → mstange
Status: NEW → ASSIGNED
Comment on attachment 8878229 [details]
Bug 1368386 - Make ProgressiveUpdate's aInvalidRegion parameter const to make it a bit easier to reason about.

https://reviewboard.mozilla.org/r/149572/#review154250
Attachment #8878229 - Flags: review?(matt.woodrow) → review+
Comment on attachment 8878230 [details]
Bug 1368386 - Make ProgressiveUpdate's aValidRegion parameter const to make it a bit easier to reason about.

https://reviewboard.mozilla.org/r/149574/#review154272
Attachment #8878230 - Flags: review?(matt.woodrow) → review+
Comment on attachment 8878231 [details]
Bug 1368386 - Add PaintedLayer::InvalidateWholeLayer().

https://reviewboard.mozilla.org/r/149576/#review154276
Attachment #8878231 - Flags: review?(matt.woodrow) → review+
Comment on attachment 8878232 [details]
Bug 1368386 - Make PaintedLayer::mValidRegion private so that its access can be tightly controlled.

https://reviewboard.mozilla.org/r/149578/#review154632
Attachment #8878232 - Flags: review?(matt.woodrow) → review+
Comment on attachment 8878233 [details]
Bug 1368386 - Only call mInvalidRegion.GetRegion() when an up-to-date valid region is requested.

https://reviewboard.mozilla.org/r/149580/#review154634
Attachment #8878233 - Flags: review?(matt.woodrow) → review+
Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/983ebee83aed
Make ProgressiveUpdate's aInvalidRegion parameter const to make it a bit easier to reason about. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/02720536f017
Make ProgressiveUpdate's aValidRegion parameter const to make it a bit easier to reason about. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/43cbca8c663e
Add PaintedLayer::InvalidateWholeLayer(). r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/11b6836cf3eb
Make PaintedLayer::mValidRegion private so that its access can be tightly controlled. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/b4d533bb18fc
Only call mInvalidRegion.GetRegion() when an up-to-date valid region is requested. r=mattwoodrow
No longer depends on: 1374038
See Also: → 1515237
You need to log in before you can comment on or make changes to this bug.