Closed Bug 429649 Opened 12 years ago Closed 9 years ago

too fat block_xdr serialization.

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: igor, Assigned: mwu)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

Currently block_xdrObject serializes the names of block locals as [atom, index] pairs. This is wasteful as the indexes of names are dense and runs from 0 to OBJ_BLOCK_COUNT(cx, obj). Thus it sufficient to serialize just atoms as the position of the atom in the serialized stream gives the index of the corresponding name.
Assignee: igor → general
This patch removes the serialization of index as suggested. The impact on the size of the output is very small - XPIProvider.jsm went from 206236 bytes to 205176 bytes (~.5% drop), but it seems worth doing anyway.
Assignee: general → mwu
Attachment #510782 - Flags: review?(igor)
Comment on attachment 510782 [details] [diff] [review]
Don't serialize index

Nice!
Attachment #510782 - Flags: review?(igor) → review+
http://hg.mozilla.org/tracemonkey/rev/64ccb8c2892a
Whiteboard: fixed-in-tracemonkey
http://hg.mozilla.org/mozilla-central/rev/64ccb8c2892a
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.