Open Bug 1659460 Opened 5 years ago Updated 1 year ago

Load the PVRManager protocol lazily

Categories

(Core :: WebVR, task, P1)

task

Tracking

()

People

(Reporter: mccr8, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [Memshrink:80KB])

Attachments

(1 file)

We load PVRManagerChild in every content process, which takes up some memory. This isn't a big deal with non-Fission, but with Fission we may have a hundred content processes, so we should only start up the PVRManager protocol if VR is enabled.

Assignee: nobody → pbone
Status: NEW → ASSIGNED
Priority: -- → P1

I removed the aVRBridge parameter from ContentChild::RecvInitRendering() and RecvReinitRendering() and took two memory reports (based on central and my patch while looking at example.com) to measure the difference. There seem to be more JS objects allocated in my patched version, I don't know why maybe I got unlucky with a GC running at a different time, but there could be a saving of maybe 50-100KB. I also recorded two memory profiles after doing a shrinking GC.

I still feel like I'm guessing, but I'm going to go with the "80KB less heap-committed" I see in the difference between the two post-GC profiles (the ones with gc) in their filename).

Whiteboard: [Memshrink:80KB]
Attached file memory-reports.tar

Hi jgilbert/ I'm not sure who to ask on the Graphics team. So please redirect if that's best.

What is the best way to lazily initalise this IPC channel? Should the content process request a channel from the parent if a page uses a VR API? Or initialise the IPC channel if there is VR hardware plugged in? (I don't know if that even makes sense, I don't know how the browser sees the hardware).

I prefer the first becase it means that you only use the memory if relevant, even if you have VR hardware plugged in it means you're not using that memory in every content process, only the ones that it might be relevant for. Plus it looks like it's simplest to query for the presence of hardware through that PVRManager interface, so the content process would want to bring up that interface and query it before we know if hardware is present.

Does that make sense? Do you have other suggestions?

Thanks.

Flags: needinfo?(kearwood)
Flags: needinfo?(jgilbert)

I looked at the memory reports you posted. One thing to note is that they have negative heap-unclassified. That probably won't affect the diffs, at least. The difference doesn't seem huge, but I guess that's not unexpected. You probably only want to bother with measurements after you do "minimize memory usage".

Hi Jim, do you know who I can ask regarding this?

Flags: needinfo?(kearwood)
Flags: needinfo?(jmathies)
Flags: needinfo?(jgilbert)

It should request a VR channel/parent only if it's requested by content.

Flags: needinfo?(jmathies)
Assignee: pbone → nobody
Status: ASSIGNED → NEW
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: