Closed Bug 1861819 Opened 2 years ago Closed 1 year ago

Use non-GC JSON parser API instead of json/json.h for principal deserialization

Categories

(Core :: Security: CAPS, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
124 Branch
Tracking Status
firefox124 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(1 file)

(similar to bug 1861787, but for deserialization)

Bug 1858803 has a prototype to add non-GC JSAPI to parse JSON with SAX-like callback handler.
Given the principal serialization/deserialization seems to be performance critical (e.g. bug 1795312),
we could look into stop using JsonCpp also for parsing principal JSON, to avoid allocating intermediate objects.

With a prototype patch, deserializing youtube principal 200000 times takes 330ms, while trunk takes 940ms.
https://treeherder.mozilla.org/jobs?repo=try&revision=c55e98dde0500ce7a73c6a2677e57f89d3cc88a9

Depends on: 1858803
Attachment #9360851 - Attachment description: WIP: Bug 1861819 - Use JS::ParseJSONWithHandler in BasePrincipal. r?peterv! → Bug 1861819 - Use JS::ParseJSONWithHandler in BasePrincipal. r?peterv!
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/d27094f86850 Use JS::ParseJSONWithHandler in BasePrincipal. r=peterv
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: