Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PERF] Model.prototype.didDefineProperty only in dev #4924

Merged
merged 2 commits into from
Apr 18, 2017

Conversation

stefanpenner
Copy link
Member

meta.parentType (which is produced by) didDefineProperty is only required for development assertions. As development assertions are stripped in prod, this didDefineProperty can also be stripped

@@ -1924,4 +1884,47 @@ if (isEnabled('ds-rollback-attribute')) {
});
}

runInDebug(() => {
Model.reopen({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this should be reopenClass as this was a static method?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually scratch that I think I read the diff wrong on the original location.

@stefanpenner
Copy link
Member Author

ember test --environment=production needs some TLC

@runspired
Copy link
Contributor

@stefanpenner this is fixed by another of my PR's, the issue is that the env is "test" at runtime but "production" at build time, so our code stripping needs to take account a little differently.

@runspired
Copy link
Contributor

runspired commented Apr 14, 2017

@stefanpenner actually, looks like you merged it: #4920 Try a rebase.

`meta.parentType` (which is produced by) `didDefineProperty` is only required for development assertions. As development assertions are stripped in prod, this `didDefineProperty` can also be stripped
@stefanpenner stefanpenner force-pushed the strip-did-define-property branch from 60d5df8 to 23503f8 Compare April 14, 2017 20:18
@stefanpenner
Copy link
Member Author

Also tidying up the other side of this in ember emberjs/ember.js#15141 (no cross dependencies exist)

@stefanpenner stefanpenner merged commit 21d7a07 into master Apr 18, 2017
@stefanpenner stefanpenner deleted the strip-did-define-property branch April 18, 2017 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants