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

Speed up JSONSerializer#applyTransforms #4281

Merged
merged 1 commit into from
Mar 28, 2016

Conversation

balinterdi
Copy link
Contributor

This attempts to fix #2289, see my comments there.

@bmac
Copy link
Member

bmac commented Mar 28, 2016

@stefanpenner Do you have time to review this pr?

@stefanpenner
Copy link
Member

🚢

@bmac bmac merged commit d1a6f13 into emberjs:master Mar 28, 2016
@bmac
Copy link
Member

bmac commented Mar 28, 2016

Thanks @balinterdi

@balinterdi
Copy link
Contributor Author

@stefanpenner @bmac The pleasure is mine!

@stefanpenner
Copy link
Member

sorry, reading for some reason i assumed some benchmarks existed. Are there some?

@balinterdi
Copy link
Contributor Author

No, there aren't :), here is (part of the) comment I made in the issue's thread:

“So I ended up using if (!(key in data)) which seems to work. The caveat is that I'm not sure whether key in data is any faster than data.hasOwnProperty(key). If somebody knows this for sure, it'd be great if they could confirm/refute this, otherwise I'll try to profile it with some app code.”

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.

applyTransforms hasOwnProp is mega slow
3 participants