Closed Bug 1573643 Opened 5 years ago Closed 3 years ago

[meta] XDR writes multiple copies of the same atom to XDR buffer

Categories

(Core :: JavaScript Engine, defect, P1)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: caroline, Assigned: caroline)

References

Details

(Keywords: meta)

When encoding JS to bytecode to be stored in the XDR buffer, atoms get written to the buffer after each script gets encoded. This is an issue for the case when a top level function
and an inner function share the same atoms. In this case atoms get copied into the XDR buffer multiple times. Such as in the example below:

function foo() {
    var i = 1;
    function bar() {
        for (var j = 0; j < 5; ++j) {
            print(i);
        }
    }
}
foo();

If foo and bar both get encoded then their shared atoms will be written to the XDR buffer multiple times. Removing these additional buffer writes has the potential to save both buffer space and time writing to the buffer.

Status: NEW → ASSIGNED
Depends on: 1574234
Depends on: 1575370
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Depends on: 1587638
Status: REOPENED → RESOLVED
Closed: 5 years ago3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.