mozilla/pdf.js — pull request #2503 by nbp (2012-12-23 16:32:27+00:00)
Title: Avoid creating new shapes due to initialization order of privateData.

The privateData object got a shape when it is created. Everytime a command is read out-of the stream a property might be added to the privateData object. Due to legacy issues, JS engines have to keep the order of initialization of the shapes. As the order is not defined, any field might appear in any order, thus creating a different shape each time.

This cause a few performance / memory issues because of the allocation of new shapes every time consume a bit of space, but it also cause the engine to create different inline caches for properties such as lenIV.

The fonttest are not running on my computer. Checking by hand with “make.js server” highlight to bad result on the “tracemonkey” paper related to the merge pull request #2493. I guess it would be best to merge this pull request after fixing fonts issues.