RESOLVED FIXED 21683
Don't create intermediate StructureIDs for builtin objects
https://bugs.webkit.org/show_bug.cgi?id=21683
Summary Don't create intermediate StructureIDs for builtin objects
Sam Weinig
Reported 2008-10-16 15:41:28 PDT
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.
Attachments
Patch 1 - Just ObjectPrototype (13.03 KB, patch)
2008-10-16 16:03 PDT, Sam Weinig
no flags
Patch 2 - A different approach (12.05 KB, patch)
2008-10-16 18:59 PDT, Sam Weinig
no flags
Patch 3 - The remaining singletons (41.28 KB, patch)
2008-10-17 17:09 PDT, Sam Weinig
no flags
Sam Weinig
Comment 1 2008-10-16 15:42:32 PDT
As a starting point, we currently allocate 142 StrucutureIDs for about:blank.
Sam Weinig
Comment 2 2008-10-16 16:03:18 PDT
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.
Geoffrey Garen
Comment 3 2008-10-16 16:22:12 PDT
Comment on attachment 24436 [details] Patch 1 - Just ObjectPrototype Clearing review flag because Sam is working on another approach.
Geoffrey Garen
Comment 4 2008-10-16 16:22:13 PDT
Comment on attachment 24436 [details] Patch 1 - Just ObjectPrototype Clearing review flag because Sam is working on another approach.
Sam Weinig
Comment 5 2008-10-16 18:59:49 PDT
Created attachment 24450 [details] Patch 2 - A different approach
Sam Weinig
Comment 6 2008-10-16 19:00:34 PDT
I obviously would not land this with #define DUMP_STRUCTURE_ID_STATISTICS 1
Maciej Stachowiak
Comment 7 2008-10-16 19:12:40 PDT
Probably don't want to check this in: -#define DUMP_STRUCTURE_ID_STATISTICS 0 +#define DUMP_STRUCTURE_ID_STATISTICS 1
Maciej Stachowiak
Comment 8 2008-10-16 19:20:45 PDT
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.
Sam Weinig
Comment 9 2008-10-16 19:59:26 PDT
Comment on attachment 24450 [details] Patch 2 - A different approach Clearing the review flag. This was landed in r37645.
Sam Weinig
Comment 10 2008-10-17 17:09:08 PDT
Created attachment 24469 [details] Patch 3 - The remaining singletons
Cameron Zwarich (cpst)
Comment 11 2008-10-17 18:09:45 PDT
Comment on attachment 24469 [details] Patch 3 - The remaining singletons r=me
Sam Weinig
Comment 12 2008-10-20 14:28:22 PDT
Comment on attachment 24469 [details] Patch 3 - The remaining singletons Clearing the review flag. This was landed in r37747.
Xan Lopez
Comment 13 2010-11-01 15:06:45 PDT
(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?
Sam Weinig
Comment 14 2010-11-04 03:30:40 PDT
Heh, yeah.
Note You need to log in before you can comment on or make changes to this bug.