Closed Bug 1381687 Opened 6 years ago Closed 6 years ago

Store and transfer schema JSON in structured clone blobs


(WebExtensions :: General, enhancement)

Not set


(firefox56 fixed)

Tracking Status
firefox56 --- fixed


(Reporter: kmag, Assigned: kmag)


(Blocks 2 open bugs)



(1 file)

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.
Blocks: webext-perf
Comment on attachment 8887262 [details]
Bug 1381687: Store and transfer schema JSON in structured clone blobs.
Attachment #8887262 - Flags: review?(aswan) → review+
Bug 1381687: Store and transfer schema JSON in structured clone blobs. r=aswan (not a CLOSED TREE)
Bug 1381687: Follow-up: Fix bustage where theme code is touching raw schema JSON that it shouldn't be.
Depends on: 1382645
== Change summary for alert #8106(as of July 20 2017 7:10 UTC) ==


 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:
Blocks: 1373418
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.