Implementation of atom deduplication in XDR using a hashmap in XDRAtom to compare already existing atoms with what would have previously been written straight to the XDRBuffer. Instead the new atoms will be written to a separate buffer containing only unique atoms. Every atom will map to an index and in the bytecode this index will be written out. Inside the XDRBuffer the separate atom buffer will be written for decoding first, before the rest of the bytecode, to build up an atom table for the rest of the bytecode to use to decode its atoms. The bytecode, when an atom index is seen, will look into the decoded atom table using that same index and retrieve the original atom. Thus, removing the need to have the same atom written to the XDRBuffer multiple times.
Bug 1575370 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Implementation of atom deduplication in XDR using a hashmap that, lives in XDRIncrementalEncoder, in XDRAtom to compare already existing atoms with what would have previously been written straight to the XDRBuffer. Instead the new atoms will be written to a separate buffer containing only unique atoms. Every atom will map to an index and in the bytecode this index will be written out. Inside the XDRBuffer the separate atom buffer will be written for decoding first, before the rest of the bytecode, to build up an atom table for the rest of the bytecode to use to decode its atoms. The bytecode, when an atom index is seen, will look into the decoded atom table using that same index and retrieve the original atom. Thus, removing the need to have the same atom written to the XDRBuffer multiple times.