Closed Bug 1710884 Opened 5 years ago Closed 1 year ago

Add IPC glue code for self-hosted XDR content [Android]

Categories

(Core :: IPC, task)

All
Android
task

Tracking

()

RESOLVED FIXED
136 Branch
Performance Impact medium
Tracking Status
firefox136 --- fixed

People

(Reporter: nbp, Assigned: mgaudet)

References

(Blocks 1 open bug)

Details

(Keywords: perf:startup, Whiteboard: [fission:android:m4][fxdroid])

Attachments

(3 external files)

Fork of the second part of Bug 1698045.

Blocks: stencil-backlog
No longer blocks: stencil
Blocks: 1618391
Depends on: 1615203

Note to self, the self-hosted shared-memory is optional and can be toggle by a preference in about:config. Due to the not-yet-implemented-highly-needed-cleanup required by Android, we might have to pass a fake fd (-1) even when the content is not present, to satisfy the fact that Android matches fd to their purpose by looking up at specific indexes in the fd-array.

Ted Campbell says we should fix this bug for Android Fission because it will reduce memory usage, probably about 400 kB per process. See bug 1710987 comment 5 for the memory improvements seen on desktop.

Hardware: Unspecified → All
Whiteboard: [fission:android:m4]
Attachment #9221638 - Attachment description: Bug 1710884 - Use shared memory for JS initialization on Android. r= → WIP: Bug 1710884 - Use shared memory for JS initialization on Android.
Performance Impact: --- → ?

Randell, I saw you updated the patch recently - did you push it to try and see if the failures / timeouts are still happening?

Flags: needinfo?(rjesup)

I have no intent to push these changes forward, if anybody more knowledgeable about GeckoView development is willing to have a look, feel free to take over the patch.

This change is expected to bring a ~40ms improvement (Bug 1618391) to the start of the content process(-es), by using what the parent process already computed.

Assignee: nicolas.b.pierron → nobody
Status: ASSIGNED → NEW

The Performance Impact Calculator has determined this bug's performance impact to be low. If you'd like to request re-triage, you can reset the Performance Impact flag to "?" or needinfo the triage sheriff.

Platforms: Android
Impact on browser: Causes noticeable startup delay

Performance Impact: ? → low
Keywords: perf:startup
See Also: → gv-fission
Whiteboard: [fission:android:m4] → [fission:android:m4][fxdroid]

I have a copy of this patch locally, but it's low on my personal queue

Flags: needinfo?(rjesup)

Hey Dave, you mentioned that the performance calculator suggests the performance impact of this bug will be low. How does that calculator work? Has it proved to be reliable?

Flags: needinfo?(dave.hunt)

(In reply to [:owlish] 🦉 PST from comment #8)

Hey Dave, you mentioned that the performance calculator suggests the performance impact of this bug will be low. How does that calculator work? Has it proved to be reliable?

Hey. You can find details on the calculator at https://wiki.mozilla.org/Performance/Triage#Triage_calculator. Since this bug was triaged we have updated the calculator so that Android has the same weight as Windows. This upgrades the impact from low to medium.

The Performance Impact Calculator has determined this bug's performance impact to be medium. If you'd like to request re-triage, you can reset the Performance Impact flag to "?" or needinfo the triage sheriff.

Platforms: Android
Impact on browser: Causes noticeable startup delay

Flags: needinfo?(dave.hunt)
Performance Impact: low → medium

I should add that the performance triage and impact calculator are more suited to defects than tasks.

Assignee: nobody → mgaudet
Status: NEW → ASSIGNED

I have manually verified that this works on geckoview-example on a local Pixel 8 via logging

This was inspired by D114126, but it appears that almost all the machinery in that patch
was obviated by Bug 1440207.

I am unable to measure via our performance testing framework a performance win here, however
using local timing on a Pixel 8 I seem to be seeing at least a 100ms improvement in content
process self-hosted initialization time, at a cost of 3ms of encode time.

Pushed by mgaudet@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/573319cc3d32 Add JS_LOG and timing to JS engine startup to get insight into XDR decode. r=nbp https://hg.mozilla.org/integration/autoland/rev/756ee35c4f48 Enable Android to use the self-hosted shared-memory cache for process startup r=nika https://hg.mozilla.org/integration/autoland/rev/0038d2ef62be apply code formatting via Lando

Backed out for causing build bustages in SelfHosting.cpp.

Flags: needinfo?(mgaudet)

Raced with Bug 1943485.

Flags: needinfo?(mgaudet)
Pushed by mgaudet@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/14e8eb30d5b1 Add JS_LOG and timing to JS engine startup to get insight into XDR decode. r=nbp https://hg.mozilla.org/integration/autoland/rev/00c0f7f77f54 Enable Android to use the self-hosted shared-memory cache for process startup r=nika https://hg.mozilla.org/integration/autoland/rev/3780ceaa56c5 apply code formatting via Lando
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: