We currently create a lot of intermediate StructureIDs when creating the JSGlobalObject due to a plethora of calls to putDirect, which transition the StructureIDs even though no other objects can ever share it. Getting rid of these should reduce memory and speed things up as well.
As a starting point, we currently allocate 142 StrucutureIDs for about:blank.
Created attachment 24436 [details] Patch 1 - Just ObjectPrototype This patch implements the technique to just reduce the number of StructureIDs for the ObjectPrototype class. It brings down the number of live StructureIDs on about:blank from 142 to 132.
Comment on attachment 24436 [details] Patch 1 - Just ObjectPrototype Clearing review flag because Sam is working on another approach.
Created attachment 24450 [details] Patch 2 - A different approach
I obviously would not land this with #define DUMP_STRUCTURE_ID_STATISTICS 1
Probably don't want to check this in: -#define DUMP_STRUCTURE_ID_STATISTICS 0 +#define DUMP_STRUCTURE_ID_STATISTICS 1
Comment on attachment 24450 [details] Patch 2 - A different approach I like this approach. Please perf test and disable the logging. r=me, with changes noted above.
Comment on attachment 24450 [details] Patch 2 - A different approach Clearing the review flag. This was landed in r37645.
Created attachment 24469 [details] Patch 3 - The remaining singletons
Comment on attachment 24469 [details] Patch 3 - The remaining singletons r=me
Comment on attachment 24469 [details] Patch 3 - The remaining singletons Clearing the review flag. This was landed in r37747.
(In reply to comment #10) > Created an attachment (id=24469) [details] > Patch 3 - The remaining singletons It seems the stuff in this patch was eventually landed, so should we close this bug?
Heh, yeah.