Closed Bug 1587638 Opened 5 years ago Closed 5 years ago

Deduplicate XDR atoms

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: iain, Assigned: iain)

References

Details

Attachments

(5 files)

We currently write out atoms once per script that uses them, which results in atoms being encoded multiple times per top-level script. We can deduplicate them across top-level scripts to save space / calls to AtomizeChars when decoding.

Our first attempt at landing this code in bug 1575370 had to be backed out, but I think we have the GC issues sorted out now.

Right now there BinAST is the only case, but subsequent patches will add GC pointers to XDR encoders and decoders.

The code that uses these fields is part of a subsequent patch. This patch is just getting the tracing right.

Depends on D48781

Depends on D48784

Pushed by iireland@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9d297847a452
Clear GC pointers in ScriptSource when canonical ScriptSourceObject is finalized r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/8834ca679ef7
Add atom map to XDRIncrementalEncoder and atom table to XDRDecoder r=jonco,tcampbell
https://hg.mozilla.org/integration/autoland/rev/145c009565f9
Add testcase to check GC barriers during XDR encoding/decoding r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/46a8774eed22
Add support for buffer switching to incremental encoder r=tcampbell
https://hg.mozilla.org/integration/autoland/rev/cf26123bd822
Deduplicate atoms in XDR r=tcampbell
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: