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

During normalization, use property lookup instead of hasOwnProp checks #4313

Closed
wants to merge 1 commit into from
Closed

During normalization, use property lookup instead of hasOwnProp checks #4313

wants to merge 1 commit into from

Conversation

sly7-7
Copy link
Contributor

@sly7-7 sly7-7 commented Apr 8, 2016

To follow #4311 and according to #2289 (comment), the server returning an undefined value is just invalid, I think we can now replace all those slowly hasOwnProp checks during the normalization process.
Seems like this would improve perfs :)

This will need #2289 to be merged before (the same tests where failing).
I will rebase after that

kindly ping to @stefanpenner @igorT @wecc @bmac

@stefanpenner
Copy link
Member

This most likely will, at the time I made the recommendation I had an active benchmark (in ember-data not just a micro one) but I have since mis-placed it.

I can try finding it, or hopefully i'll have some time soon to revisit it, so we can double check this improvement.

@bmac
Copy link
Member

bmac commented May 3, 2016

I tried to get this (old) benchmark working to see if it could be used to test this pr https://github.com/emberjs/data/tree/igor-benchmarks. After spending about an hour looking at it I was still unable to get it to run successfully.

@stefanpenner
Copy link
Member

@chadhietala @asakusuma testing this in one your ED heavy apps might reveal something, specifically the call times of the methods in question.

@asakusuma
Copy link
Contributor

@stefanpenner you wanting to confirm a perf boost, or wanting to make sure this doesn't break something?

@msranade is doing some perf testing right now.

@stefanpenner
Copy link
Member

@stefanpenner you wanting to confirm a perf boost, or wanting to make sure this doesn't break something?

both, and especially the selfTime of the call-sites that have been updated. such as extractAttributes etc.

@bmac
Copy link
Member

bmac commented May 23, 2016

@minasmart or @asakusuma did you get a chance to pref test this pr?

@stefanpenner
Copy link
Member

@bmac I'm confident in saying that this will be positive for performance. Latest v8 starts to optimize hOP, but this form is still faster. Most importantly all those older android devices will also benefit.

@bmac
Copy link
Member

bmac commented May 23, 2016

Thanks @stefanpenner. @sly7-7 do you have time to rebase this pr?

@bmac
Copy link
Member

bmac commented May 24, 2016

This pr has been committed as 03b34e2

@bmac bmac closed this May 24, 2016
@sly7-7 sly7-7 deleted the serializer-normalize-use-property-lookup branch June 15, 2016 08:33
@sly7-7
Copy link
Contributor Author

sly7-7 commented Jun 15, 2016

@bmac I'm slowly recovering from a big burn out. I'm still not able to develop anything 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ perf PRs that improve performance in a notable way
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants