Open Bug 1477224 Opened 6 years ago Updated 22 days ago

Make PBrowser::RenderLayers message high priority

Categories

(Core :: Graphics, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: mconley, Unassigned)

References

(Blocks 1 open bug)

Details

This is something smaug suggested a few weeks back that I just remembered now and want to jot down and try.

For a brief primer on tab switching and renderLayers, please read http://firefox-source-docs.mozilla.org/browser/base/tabbrowser/async-tab-switcher.html

So we have two messages heading down to the content process when doing a tab switch: the renderLayers message, and the forcePaint message occurring on the process hang monitor thread.

The process hang monitor IPC channel, since it's usually pretty quiet, often receives and processes its message first. However, it's only really useful if the main thread of the content process is blocked running JS; if so, it'll interrupt the JS and force a paint. Otherwise, it just bails out.

So in the event that we're not in JS (perhaps we're processing a queue of IPC messages, where none of them cause script to run), the forcePaint message will never allow us to "get ahead" and force the paint, and we have to rely on the renderLayers message.

We do, however, have a way of increasing the priority of certain IPC messages. I believe setting the renderLayers IPC message priority to "high" is a pretty simple thing to do, and I'd be interested in what it does to tab switch times and tab switch spinner rates.
Seems like a good thing to try out.
Whiteboard: [fxperf] → [fxperf:p2]
Whiteboard: [fxperf:p2] → [fxperf:p3]
Component: DOM: Content Processes → Graphics
Priority: -- → P3
Severity: normal → S3
Whiteboard: [fxperf:p3]
You need to log in before you can comment on or make changes to this bug.