Bug 153399 - Reduce number of Structures created at startup
Summary: Reduce number of Structures created at startup
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords: Performance
Depends on:
Blocks:
 
Reported: 2016-01-23 05:18 PST by Andreas Kling
Modified: 2016-01-25 00:18 PST (History)
5 users (show)

See Also:


Attachments
Patch for EWS (50.55 KB, patch)
2016-01-23 05:19 PST, Andreas Kling
no flags Details | Formatted Diff | Diff
Patch (62.98 KB, patch)
2016-01-23 14:34 PST, Andreas Kling
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews116 for mac-yosemite (348.76 KB, application/zip)
2016-01-23 15:21 PST, Build Bot
no flags Details
Patch (53.59 KB, patch)
2016-01-23 16:11 PST, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.