Closed Bug 1704965 Opened 4 years ago Closed 4 years ago

Many X11 connections created when GPU process is enabled

Categories

(Core :: Widget: Gtk, defect, P3)

defect

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: jld, Assigned: stransky)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

With the GPU process enabled, we use CompositorWidgetParent instead of InProcessGtkCompositorWidget; the latter is passed an X11 display, but the former opens its own. Empirically, we open at least one for each window, and causing tooltips or menus to pop up can create more. I've seen as many as 7 connections per window and I don't know if there's an upper bound.

(Note that these connections are made from the GPU process, on behalf of PCompositor{Manager,Bridge,Widget} actors from the parent process; this is unrelated to X connections from content processes.)

These should be shared somehow; ideally this would reuse the GTK display, but if that doesn't work (threading issues?) they should at least share one among themselves.

I don't know if this is strictly a blocker for using the GPU process, but for users with a lot of windows it could cause problems with the 256-client limit.

Yes, we can reuse the display connection as we enable multi-threading for X11. A simple fix which will replace XOpenDisplay() with DefaultXDisplay() may be enough, or even remove mXDisplay member and always call DefaultXDisplay() instead.

Priority: -- → P3
Assignee: nobody → stransky
Status: NEW → ASSIGNED

Try looks good.

Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/ad94106d8496 [Linux] Remove display connection from nsWindow, CompositorWidgetParent and WindowSurfaceProvider, r=jhorak
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: