Open Bug 1462841 Opened 6 years ago Updated 2 years ago

L10nRegistry Shared Memory & IPC

Categories

(Core :: Internationalization, enhancement, P3)

enhancement

Tracking

()

Fission Milestone Future

People

(Reporter: zbraniecki, Unassigned)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [overhead:200k])

L10nRegistry currently lives in the parent process and has no support for the content process. We either have to keep an instance per process, or develop an IPC strategy to handle unified resource and state storing in the parent process and "client" mode for content processes. The culprit will be the ability to transfer cached resources between contexts between process, which may be addressed by bug 1384236.
Blocks: 1462839
Priority: -- → P3

jimm says this L10n change is expected to save about 200 KB per content process. Work is planned for 2020 H2.

Fission Milestone: --- → M7
Whiteboard: [overhead:200k]
Depends on: 1660392
Summary: L10nRegistry IPC → L10nRegistry Shared Memory & IPC

Moving this out to Fission-MVP as it's still waiting for L10 rewriting in Rust and will not be done in time to do this shared memory work by M7.

Fission Milestone: M7 → MVP
Fission Milestone: MVP → Future

This is now unblocked! The cache that is currently stored per-process but should be shared between processes is here: https://github.com/mozilla/l10nregistry-rs/blob/master/src/registry/mod.rs#L26

My naive understanding of what has to happen here is:

  1. make it possible to share the Vec<FileSource> between processes
  2. add logic to allow parent process instance to modify that cache
  3. add logic to allow content process instance to read from that cache
  4. add IPC methods for parent process to emit events when changes happen, and for content process to listen to those events
  5. Add IPC methods for content process to request changes that parent process can execute

:kmag - does the above plan look reasonable to you?
Also, can you take a look at the current importance of that for Fission? How much memory would we save? We also should take into account that we'll move another bunch of strings to Fluent in H2 2021 (optimistically completing M1 and M2 of https://www.arewefluentyet.com/).

Flags: needinfo?(kmaglione+bmo)

Kris - this is now unblocked and we're making progress at moving more of DTD and .properties to Fluent.

Can you suggest how to reason about the priority of this? What kind of savings can we hope to get if we share memory between processes after moving all .properties to Fluent?

I'm removing the needinfo. If we or the Fission team want to prioritize this work, we can seek to get more input on Zibi's plan.

Flags: needinfo?(kmaglione+bmo)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.