Closed Bug 1804254 Opened 2 years ago Closed 2 years ago

Replace some JSObjects used to store module metadata with native structures

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
109 Branch
Tracking Status
firefox109 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

(Blocks 1 open bug)

Details

(Keywords: perf-alert)

Attachments

(3 files)

Currently the module metadata is all stored in JSObjects. This was originally done for ease of access by the self-hosted module implementation and so that testcode could get at the internals of the system.

Since the module system is no longer self-hosted it makes sense to move these to a native representation. This could reduce memory use and GC overhead a little for large module graphs.

Assignee: nobody → jcoppeard

This removes the JSObject per import entry and the ArrayObject holding them,
replacing them with a vector of ImportEntry native objects.

This was straightforward apart from the changes to the shell wrappers where I
had to add a new set of defines for dealing with native classes.

The same as the previous patch, but for export entries.

Depends on D163947

This is more complicated because it needed a change to the public API now we're
not longer returning an array object. The new API is less error prone since
it's no longer possible for the caller to mutate the object returned.

Depends on D163948

Blocks: sm-runtime
Severity: -- → N/A
Priority: -- → P1
Pushed by jcoppeard@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/be9fc5ccfb72 Part 1: Replace ImportEntryObject with native ImportEntry r=arai https://hg.mozilla.org/integration/autoland/rev/8cb06ae1d62f Part 2: Replace ExportEntryObject with native ExportEntry r=arai https://hg.mozilla.org/integration/autoland/rev/02823568f12c Part 3: Replace RequestedModuleObject with native RequestedModule r=arai
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch

(In reply to Pulsebot from comment #4)

Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/be9fc5ccfb72
Part 1: Replace ImportEntryObject with native ImportEntry r=arai
https://hg.mozilla.org/integration/autoland/rev/8cb06ae1d62f
Part 2: Replace ExportEntryObject with native ExportEntry r=arai
https://hg.mozilla.org/integration/autoland/rev/02823568f12c
Part 3: Replace RequestedModuleObject with native RequestedModule r=arai

== Change summary for alert #36418 (as of Mon, 12 Dec 2022 14:51:10 GMT) ==

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
1% Base Content JS windows10-64-2004-shippable-qr fission 1,614,620.67 -> 1,606,102.00
1% Base Content JS macosx1015-64-shippable-qr fission 1,612,248.00 -> 1,603,832.00
0.42% Base Content JS windows10-64-2004-shippable-qr fission 1,614,698.67 -> 1,607,926.67
0.41% Base Content JS linux1804-64-shippable-qr fission 1,610,288.67 -> 1,603,668.67

For up to date results, see: https://treeherder.mozilla.org/perfherder/alerts?id=36418

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: