Closed Bug 1363423 Opened 3 years ago Closed 3 years ago

Extremely bad PresShell::Paint performance on http://a816-dohbesp.nyc.gov/IndicatorPublic/dognames/

Categories

(Core :: Panning and Zooming, defect, P2)

55 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: mconley, Assigned: botond)

References

()

Details

(Keywords: perf, Whiteboard: [qf:p1][gfx-noted])

Attachments

(1 file)

STR (warning - will kill main thread):

1. Visit http://a816-dohbesp.nyc.gov/IndicatorPublic/dognames/


This absolutely kills the main thread. Here's a profile I captured:

https://perfht.ml/2qOkBNl

It seems like we're spending a lot of time in PresShell::Paint. Like, multiple seconds.

Hey jrmuizel, anything useful in here? Is this a known bug?
Flags: needinfo?(jmuizelaar)
Nice. AccumulateEventRegions is the culprit. We should investigate why the event region is so large.
Component: Graphics → Panning and Zooming
Flags: needinfo?(jmuizelaar)
Flags: needinfo?(botond)
Yikes. We're building a maybe-hit region with 1.26 million rectangles! We probably shouldn't be doing that :)
Flags: needinfo?(botond)
This is very similar to bug 1333195. In that testcase, the maybe-hit region "only" has about 190,000 rects.
See Also: → 1333195
We previously added a |mMaybeHitRegion.SimplifyOutward(8)| call to AccumulateEventRegions() in bug 1200158, but then removed it in bug 1201548.

I don't see a correctness reason for removing it in bug 1201548, we just no longer needed it to address a different performance problem, so I think it should be safe to put back.
(I also invesigated using TiledRegion instead, but I didn't see any performance wins compared to SimplifyOutward, and it's more complicated code-wise, so we're going to stick with the SimplifyOutward approach.)
Assignee: nobody → botond
Duplicate of this bug: 1333195
Priority: -- → P2
Whiteboard: [qf] → [qf][gfx-noted]
Version: unspecified → 55 Branch
Comment on attachment 8867483 [details]
Bug 1363423 - Prevent the maybe-hit region from growing too large (in terms of number of rectangles) in PaintedLayerData::AccumulateEventRegions().

https://reviewboard.mozilla.org/r/139022/#review143656
Attachment #8867483 - Flags: review?(jmuizelaar) → review+
Pushed by bballo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c5ac37367e2e
Prevent the maybe-hit region from growing too large (in terms of number of rectangles) in PaintedLayerData::AccumulateEventRegions(). r=jrmuizel
https://hg.mozilla.org/mozilla-central/rev/c5ac37367e2e
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Whiteboard: [qf][gfx-noted] → [qf:p1][gfx-noted]
You need to log in before you can comment on or make changes to this bug.