Page Style (alternative style sheets) menu population can delay about:home from painting

RESOLVED FIXED in Firefox 67

Status

()

defect
P3
normal
RESOLVED FIXED
5 months ago
2 months ago

People

(Reporter: mconley, Assigned: mconley)

Tracking

(Regressed 1 bug)

unspecified
Firefox 67
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox67 fixed)

Details

(Whiteboard: [fxperf:p1])

Attachments

(3 attachments)

Here's a profile:

http://bit.ly/2Xitk7C

Here's the relevant bit:

http://bit.ly/2XfOJ1n

We're... getting a pageshow off of an SVG? And that's causing PageStyleChild.jsm to load at a pretty bad time when it's clear that the disk is pretty busy.

Do we ever need PageStyleChild.jsm for our internal pages? I doubt it. We barely need for normal pages. Does the matches syntax allow us to blacklist about: pages?

Even better, just have the actor match https://* and http://*.

Backlog for the menus component, but that shouldn't affect the fxperf prioritization, which should probably be higher if this is trivial to fix.

Priority: -- → P3

Interesting.. In addition to the suggestion here, it looks like PageStyleChild.jsm gathers the info synchronously with the pageshow event [1], but it really should send it off an idle callback, or at least a spin of the event loop.

[1] https://searchfox.org/mozilla-central/rev/b10ae6b7a50d176a813900cbe9dc18c85acd604b/browser/actors/PageStyleChild.jsm#56

There's one catch with using matches: on the actors, which is that it implies using allFrames=true. It's not gonna break anything since the handleEvent in PageStyleChild filters non-toplevel events, but it'll run more often. I don't think this will be a problem though.. but perhaps the idle callback suggestion is enough to fix the problem?

Whiteboard: [fxperf] → [fxperf:p2]

This avoids instantiating them for internal pages, like about:home.

Blocks: 1522877
Whiteboard: [fxperf:p2] → [fxperf:p1]
Assignee: nobody → mconley
Pushed by mconley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/459979fd1d25
PageStyle child actors should only instantiate for web pages. r=Felipe
https://hg.mozilla.org/integration/autoland/rev/f49189976e12
Send PageStyle information up from pageshow events only after idle. r=Felipe

The PageStyleChild now only attaches to normal web pages.

Depends on D22521

Pushed by mconley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cd0a4ead024e
PageStyle child actors should only instantiate for web pages. r=Felipe
https://hg.mozilla.org/integration/autoland/rev/92aa678ac36b
Send PageStyle information up from pageshow events only after idle. r=Felipe
https://hg.mozilla.org/integration/autoland/rev/8ac8ed5ac772
Update browser_page_style.js test to use a normal web page rather than a data URI. r=gl
Flags: needinfo?(mconley)
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67

== Change summary for alert #19832 (as of Fri, 08 Mar 2019 22:12:40 GMT) ==

Improvements:

0% Base Content JS osx-10-10 opt stylo 4,013,984.00 -> 4,000,452.00

For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=19832

[adding Alternative Style Sheets to bug summary for searchability purposes, since this is about https://developer.mozilla.org/en-US/docs/Web/CSS/Alternative_style_sheets ]

Summary: Page Style menu population can delay about:home from painting → Page Style (alternative style sheets) menu population can delay about:home from painting
Regressions: 1553695
You need to log in before you can comment on or make changes to this bug.