Open Bug 1589085 Opened 5 years ago Updated 1 year ago

Protocol and MIME info handler service access in the child process causes synchronous IPC

Categories

(Firefox :: File Handling, defect, P3)

defect

Tracking

()

Performance Impact low

People

(Reporter: Gijs, Unassigned)

References

Details

(Keywords: perf:responsiveness)

This bit of sync IPC seems unfortunate. I'm not entirely sure what alternatives we have - creating a copy of the OS's information in the child seems unfortunate, and I assume we don't want to give the child access to the relevant OS APIs as it conflicts with sandboxing. But the current situation is also not great, and at least the information the handler service itself keeps (as opposed to the OS) can be made available in the child.

It's possible that the document channel work might help in terms of how often we need this? Or for network loads we could set the information on the channel in a way that is shared with the child on a per-instance basis, so we don't have to look it up if we have a pending request? Or perhaps we don't actually need the OS-y details (e.g. which handler app to use), just whether or not we have any and/or want to handle it internally or with an add-on/website, which is info we control and can perhaps more easily share with the child?

:haik, I'm assuming you've already thought about some of this, perhaps you can clarify some of the thinking around how this currently works and/or what other options were considered / not deemed viable?

(In reply to :Gijs (he/him) from comment #0)

:haik, I'm assuming you've already thought about some of this, perhaps you can clarify some of the thinking around how this currently works and/or what other options were considered / not deemed viable?

Meant to needinfo for this. The initial sync IPC stuff was added by blassey (r=mrbkap), who are both no longer at moco...

Flags: needinfo?(haftandilian)

At the time, my rationale was that continuing to use sync IPC was OK because the uses were not in hot code paths and some of the API calls do disk I/O anyway.

One question I have is can we rework things so that the child doesn't need this information. The child process can't launch any applications so can is it really necessary for the child to know what applications/helpers are available?

One issue is that if user installs a new application to handle a certain MIME type, we want Firefox to be able to use it without requiring a restart. So a solution that caches the results of the OS call would not work.

Flags: needinfo?(haftandilian)
Priority: -- → P3
Whiteboard: [fxperf][qf] → [fxperf:p3][qf]
Whiteboard: [fxperf:p3][qf] → [fxperf:p3][qf:p3:responsiveness]
Performance Impact: --- → P3
Whiteboard: [fxperf:p3][qf:p3:responsiveness] → [fxperf:p3]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.