Open Bug 1612133 Opened 5 years ago Updated 3 years ago

Lots of time spent display list building for hit testing on engadget.com on android

Categories

(Core :: Web Painting, defect, P3)

defect

Tracking

()

People

(Reporter: jnicol, Unassigned)

References

(Depends on 1 open bug)

Details

Non-webrender profile: https://perfht.ml/2RBWhL5

For context, Kris noticed this as some jankiness whilst scrolling engadget on fenix with webrender enabled, and wasn't sure he saw it with webrender disabed. Looking at the profiles I'm assuming the display building is the problem. The renderer thread appears to be doing okay, but perhaps is more likely to jank when the content process main thread is so busy, whereas in layers the compositor thread has less work to do so handles it slightly better.

This is quite unfortunate: the website has an advertisement that sets a timer calling Document.elementFromPoint(), which will build a display list as part of nsLayoutUtils::GetFramesForArea(). This will be slow because main thread hit testing does not use retained display lists. Long term solution would be to figure out a way to use retained display lists for hit testing (bug 1288096).

I think we can also speed up the current non-retained hit testing by reducing the overhead of creating the hit test items (bug 1612318).

Depends on: 1612318, 1288096
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.