Store and transfer schema JSON in structured clone blobs

RESOLVED FIXED in Firefox 56

Status

enhancement
RESOLVED FIXED
2 years ago
11 months ago

People

(Reporter: kmag, Assigned: kmag)

Tracking

(Blocks 2 bugs)

unspecified
mozilla56
Dependency tree / graph

Firefox Tracking Flags

(firefox56 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

2 years ago
We currently spend a lot of time, especially at startup, structured cloning schema JSON data to send to content processes, either via initialProcessData or Schema:Add messages. We also, unfortunately, tend to access it via proxies in compartments other than the one that owns it.

Storing the data in StructuredCloneBlobs should help with both of these problems, since they're much cheaper to clone (a simple memcpy rather than a recursive walk of a large object tree through cross-compartment proxies), and would wind up decoded into the Schemas.jsm compartment no matter how they're loaded.
Comment hidden (mozreview-request)
Assignee

Updated

2 years ago
Blocks: webext-perf

Comment 2

2 years ago
mozreview-review
Comment on attachment 8887262 [details]
Bug 1381687: Store and transfer schema JSON in structured clone blobs.

https://reviewboard.mozilla.org/r/158056/#review164420
Attachment #8887262 - Flags: review?(aswan) → review+
Assignee

Comment 3

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/7066bee0381d62764ba8fc55aa4270eb5a241b20
Bug 1381687: Store and transfer schema JSON in structured clone blobs. r=aswan (not a CLOSED TREE)
Assignee

Comment 4

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/4f740894454e7d3fab18e2926391fdca1d8a9121
Bug 1381687: Follow-up: Fix bustage where theme code is touching raw schema JSON that it shouldn't be.
https://hg.mozilla.org/mozilla-central/rev/7066bee0381d
https://hg.mozilla.org/mozilla-central/rev/4f740894454e
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
== Change summary for alert #8106(as of July 20 2017 7:10 UTC) ==

Improvements:

 5%  ts_paint_webext windows10-64 opt e10s     950.5 -> 900.17
 5%  ts_paint_webext windows7-32 pgo e10s   867.96 -> 828.77
 4%  ts_paint_webext windows7-32 opt e10s     1067.33 -> 1028.42
 3%  ts_paint_webext linux64 opt e10s   1280.08 -> 1241.92
 2%  ts_paint_webext linux64 pgo e10s 1125.67 -> 1101.25


For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=8106
Assignee

Updated

2 years ago
Blocks: 1373418

Updated

11 months ago
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.