Bug 153399

Summary: Reduce number of Structures created at startup
Product: WebKit Reporter: Andreas Kling <kling>
Component: JavaScriptCoreAssignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, keith_miller, mark.lam, msaboff, sbarati
Priority: P2 Keywords: Performance
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch for EWS
none
Patch
buildbot: commit-queue-
Archive of layout-test-results from ews116 for mac-yosemite
none
Patch none

Description Andreas Kling 2016-01-23 05:18:35 PST
For prototype and constructor objects, we should use JSObject::addPropertyWithoutTransition() as much as possible, to avoid creating tons of Structure transitions that won't get used for anything.
Comment 1 Andreas Kling 2016-01-23 05:19:11 PST
Created attachment 269669 [details]
Patch for EWS
Comment 2 Mark Lam 2016-01-23 07:31:17 PST
Comment on attachment 269669 [details]
Patch for EWS

Nice.
Comment 3 Andreas Kling 2016-01-23 14:34:11 PST
Created attachment 269676 [details]
Patch

Cover a few more cases (non-index accessors and native getters.)
Comment 4 Build Bot 2016-01-23 15:21:40 PST
Comment on attachment 269676 [details]
Patch

Attachment 269676 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/730698

Number of test failures exceeded the failure limit.
Comment 5 Build Bot 2016-01-23 15:21:43 PST
Created attachment 269677 [details]
Archive of layout-test-results from ews116 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews116  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 6 Keith Miller 2016-01-23 15:32:05 PST
I was thinking about doing this for a while. Glad it's getting done!
Comment 7 Andreas Kling 2016-01-23 16:11:02 PST
Created attachment 269679 [details]
Patch

Back to the original patch + ChangeLog.
Can deal with the non-index accessors and stuff in a separate patch, and keep this one simple.
Comment 8 Darin Adler 2016-01-24 12:14:14 PST
Comment on attachment 269679 [details]
Patch

Can you add some simple regression testing mechanism that will catch if someone get this wrong in the future? Maybe a count of structure transitions during the process of making the JSGlobalObject or something?
Comment 9 WebKit Commit Bot 2016-01-25 00:18:21 PST
Comment on attachment 269679 [details]
Patch

Clearing flags on attachment: 269679

Committed r195528: <http://trac.webkit.org/changeset/195528>
Comment 10 WebKit Commit Bot 2016-01-25 00:18:25 PST
All reviewed patches have been landed.  Closing bug.